Base32 Encode / Decode
Understand Base32 Encode / Decode
Base32 encodes bytes using 32 letters and digits chosen so a person can read them aloud or type them without ambiguity.
How it works
The RFC 4648 alphabet is A–Z plus 2–7. It deliberately omits 0, 1, 8, and 9 because they are easily confused with O, I, and B. Five bytes (40 bits) map to eight characters of five bits each, which makes the output about 60% larger than the input — noticeably worse than Base64's 33%, and the price paid for the smaller alphabet. Padding with = brings the final group up to eight characters, and decoding is case-insensitive.
When to use it
- Reading or generating the shared secret behind a TOTP code — Google Authenticator, Authy, and 1Password all exchange it as Base32.
- Encoding a value that will be read off a screen and typed in by hand, or spoken over a phone.
- Building an identifier for a case-insensitive filesystem, where Base64's mixed case would collide.
- Working with DNS labels or onion addresses, which are case-insensitive and use Base32 for that reason.
Watch out for
- There is more than one Base32. RFC 4648 base32 (A–Z, 2–7), base32hex (0–9, A–V), Crockford's Base32, and z-base-32 all exist and none of them interoperate — output that decodes to garbage usually means the wrong variant, not corrupt data.
- A TOTP secret is random bytes, not text. Decoding one here produces unreadable characters, which is expected: the bytes are the key and they are not meant to spell anything.
- Like Base64, this is encoding rather than encryption. A Base32 authenticator secret on screen is a live credential in plain sight.
Frequently Asked Questions
When is Base32 used instead of Base64?
Base32 shines where case-insensitivity matters: TOTP authenticator secrets (Google Authenticator, Authy), QR codes that may be uppercased, file system paths on case-insensitive OSes, and checksums for human transcription where zero vs O or one vs l cause errors.
How does Base32 compare to Base64 in size?
Base32 expands data by ~60% (5 bytes → 8 chars) versus Base64's ~33% expansion (3 bytes → 4 chars). The larger overhead is the price for using a smaller, unambiguous alphabet.
What is the Base32 alphabet?
RFC 4648 Base32 uses A–Z and 2–7 (32 characters). It deliberately omits 0 (zero), 1 (one), 8, and 9 to avoid confusion with O, I/L. The = character is used for padding.
How to Use Base32 Encode / Decode
- Paste or type your input in the input area above.
- The tool processes your input automatically or click Run.
- Copy or download the result using the action buttons.
- Use Ctrl+Enter to run quickly from the keyboard.