How to use it
- Pick Encode to turn text into Base32, or Decode to turn Base32 back into text.
- Type or paste your input. The result appears as you type.
- Use the standard alphabet unless the system you are working with asks for extended hex. Keep padding on unless it says otherwise.
- If the data is raw bytes rather than text, such as an authenticator key, change “Data is” to Hex bytes.
When to use it
- Reading or writing the Base32 secret keys that many authenticator apps use when you set them up by hand.
- Encoding data for systems that need case-insensitive text with no symbols.
- Decoding a Base32 string from a log, a configuration file or a DNS record to see what it holds.
- Comparing the standard and extended-hex alphabets.
How Base32 works
Base32 rewrites binary data using only 32 safe characters. Computers store data in 8-bit bytes. Base32 reads the bytes as one long string of bits, cuts it into 5-bit groups, and writes each group as one character, because 5 bits can hold exactly 32 values. Five bytes (40 bits) become eight characters. If the data does not fill a whole block, the last group is padded with zero bits and the output is topped up with “=” signs to a multiple of eight characters.
Decoding reverses the steps: each character becomes five bits, the bits are regrouped into bytes, and any padding bits at the end are discarded.
Worked example. The text foo is the bytes 66 6F 6F, which is the 24 bits 01100110 01101111 01101111. Regroup them in fives: 01100 11001 10111 10110 1111. The last group has only four bits, so it is padded to 11110. The values are 12, 25, 23, 22 and 30, which the standard alphabet writes as M, Z, X, W and 6. That gives MZXW6, and padding to eight characters gives MZXW6===.
RFC 4648 lists foobar as MZXW6YTBOI====== in the standard alphabet, which is what the tool shows when it opens.
Where you will see Base32
Base32 is common wherever people may need to read or type a value. Its alphabet leaves out look-alike digits (0, 1, 8 and 9), is case-insensitive and avoids symbols that can break links and file names. The best-known use is the secret key behind two-factor authentication codes: authenticator apps expect the shared key to be Base32 text, as in the common otpauth key format that follows RFC 6238 time-based one-time passwords.
Base32 is not encryption
Anyone can decode Base32 with no key. It changes how data is written, not who can read it. Do not use it to hide passwords or personal data.
| Encoding | Characters | Bits per character | Size compared with the original |
|---|---|---|---|
| Hexadecimal (Base16) | 0–9, A–F | 4 | 200% |
| Base32 | A–Z, 2–7 (standard) | 5 | 160% |
| Base64 | A–Z, a–z, 0–9, +, / | 6 | about 133% |
Frequently asked questions
What is Base32 encoding?
It is a way of writing binary data using 32 safe characters, defined in RFC 4648. Every five bytes become eight characters, so the text is about 60% longer than the original data.
What is the difference between Base32 and Base64?
Base64 uses 64 characters and is more compact, but it is case-sensitive and uses symbols such as + and /. Base32 is longer, though easier to read aloud and to type, and it is safe in case-insensitive systems such as some file names and DNS labels.
Why do 2FA secret keys use Base32?
The authenticator key format expects the shared secret as Base32 text, which is easy for people to read and copy. If you decode such a key you will get raw bytes, so use the Hex option rather than Text.
Is Base32 a form of encryption?
No. It is a reversible format and needs no key, so it offers no protection. Use real encryption if the data must stay secret.
Why does Base32 output end in equals signs?
Padding makes the length a multiple of eight characters so decoders can tell where the data ends. Many systems omit it, and this tool decodes input with or without padding.
Why do I get an invalid character error?
The standard alphabet has only the letters A–Z and the digits 2–7. The digits 0, 1, 8 and 9 are not used, and symbols are not allowed. If your data uses 0–9 and A–V, switch to the extended-hex alphabet.
Sources and further reading
- RFC 4648: The Base16, Base32, and Base64 Data Encodings (opens in a new tab) – the standard alphabets, padding rules and test vectors
- RFC 6238: TOTP: Time-Based One-Time Password Algorithm (opens in a new tab) – the algorithm behind authenticator codes
- Google Authenticator: Key URI Format (opens in a new tab) – secret keys are Base32 in the otpauth format
- MDN: TextEncoder (opens in a new tab) – how text becomes UTF-8 bytes in the browser