Base32 is a binary-to-text encoding that represents data using only the uppercase letters A to Z and the digits 2 to 7. This tool encodes text into that form and decodes it back, handling padding and stray whitespace for you.
How it works
Encoding reads the input bytes as a continuous stream of bits and slices it into 5-bit groups, mapping each group to one alphabet character:
alphabet = ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 (index 0..31)
take 8 bits at a time, emit a character for every 5 bits accumulated
pad the final group with zero bits, then add '=' to reach a multiple of 8
Decoding reverses this: each character becomes its 5-bit index, the bits are re-concatenated, and every full 8 bits becomes one output byte. Leftover bits from padding are discarded.
Worked example and tips
The text Gera Tools (10 bytes) encodes to a Base32 string. Each 5 bytes of input becomes 8 characters of output, so 10 bytes fills exactly 16 characters with no padding needed. A 6-byte input would need 2 padding characters to reach the next multiple of 8.
Because the RFC 4648 Base32 alphabet deliberately excludes 0, 1, 8, and 9, it is the format behind TOTP authenticator-app secrets: you can dictate the key over the phone digit by digit without the listener confusing 0 and O or 1 and I. The same property makes Base32 reliable in DNS TXT records, where some systems quietly uppercase or lowercase text.
Base32 in context: when to choose it
| Format | Case sensitivity | Avoids look-alikes | Space overhead | Common use |
|---|---|---|---|---|
| Base64 | Case-sensitive | No (uses +, /) | ~33% | Email, data URIs, JWTs |
| Base32 | Case-insensitive | Yes (A-Z, 2-7) | ~60% | TOTP keys, file hashes, DNS |
| Base32Hex | Case-insensitive | Partial | ~60% | Sort-order–preserving IDs |
| Hex (Base16) | Case-insensitive | N/A (digits + A-F) | 100% | Byte dumps, cryptographic hashes |
Choose Base32 when:
- The output will be read or typed by a human
- The system stores or transmits the value as case-insensitive text
- You need the encoded form to survive email forwarding, DNS propagation, or legacy uppercasing middleware
If you are storing a value where length matters more than legibility, prefer Base64. If you need a URL-safe compact token, Base62 or URL-safe Base64 are better fits. Everything runs locally in your browser; nothing is uploaded.