Base32 Encoder
Need to encode string to Base32? This Base32 encoder converts text with the standard Base32 alphabet (A–Z and 2–7), with optional Base32 padding when a system expects it. Use it for TOTP secrets, backup codes, and values that must survive being read aloud.
In WeChat, downloads and image copy may be blocked. If a button does not respond, tap ··· in the top-right corner and choose Open in Browser.
Base32 encode turns text into the RFC 4648 alphabet of A–Z and 2–7, producing a string that survives being read aloud, typed from a printout or stored in a case-insensitive system, with the encoding done in your browser. The text never leaves the device.
The usual reason to reach for it is a shared secret: authenticator apps and TOTP setup strings use Base32 because the alphabet omits digits that look like letters. It is also handy when a ticket number or a short payload has to be dictated over the phone. The encoder on this page follows the same alphabet as RFC 4648, so a value created here decodes in any compliant library, including the one inside an authenticator app.
How to use
- Type or paste the text. The left box accepts any Unicode text, and Sample loads a string with an emoji. The output on the right updates as you type; there is no submit button.
- Choose the output shape. No padding removes the trailing
=characters, and Lower case output converts the whole string to lower case. Both options change the visible value, not the decoded bytes, so pick whichever the receiving system documents. - Copy or download. Copy places the base32 encode result on the clipboard, and Download saves
encoded.txt. A Decode tab sits beside Encode if you need to check the round trip.
Alphabet, padding and byte growth
Base32 is longer than Base64 and less familiar, but its constraints are simple. These are the three that decide what your output looks like.
How the base32 encoder maps bytes
Every five bits become one character. Eight characters therefore carry five bytes, which is why Hello becomes JBSWY3DP: five source bytes, eight output characters, a 60% increase. The final group is padded with = until the length is a multiple of eight, so Hi becomes JBUQ==== and foobar becomes MZXW6YTBOI======. Long padding runs are normal, not a sign of damage. The count follows the group: one leftover byte needs six signs, two need four, three need three, and four need one.
Inside the base32 alphabet
The alphabet has 32 symbols: A through Z and the digits 2 through 7. Zero, one, eight and nine are missing on purpose, because they are easy to confuse with O, I, B and g when handwritten. Decoding is case-insensitive, so jbswy3dp and JBSWY3DP are the same value. That property is the main reason TOTP secrets use Base32 instead of Base64. When dictating a value, say “two” for the digit and “B” for the letter, since that pair causes most transcription errors.
Encode string to base32 without breaking Unicode
Input is converted to UTF-8 bytes before encoding. A tab is one byte, so a<TAB>b becomes MEEWE===; the emoji 👋 is four bytes and becomes 6CPZDCY=. If a value is meant to be read aloud, keep Lower case off and say “capital” explicitly, because a listener may otherwise write 8 where the alphabet only allows B. Lower case is fine for JSON, but some authenticator imports compare the secret exactly as printed. A base32 encode that ends in six signs means the source was a single byte, which is a useful hint when auditing a short token.
FAQ
What does base32 padding do?
A base32 encode pads the last group with equals signs until the string length is a multiple of eight. Hi becomes JBUQ==== with four signs. Keep padding for RFC 4648 systems and remove it only when a service explicitly documents unpadded secrets.
Why is Base32 longer than Base64?
Base32 stores five bits per character, while Base64 stores six, so the same bytes need more symbols. A payload grows by about 60% instead of 33%. The trade is a safer alphabet that avoids 0, 1, 8 and 9 and can be typed or spoken without confusion.
Is the base32 encoder case sensitive?
Output is uppercase by default, and the Lower case option converts it. Decoding ignores case, so either form works. Some older systems compare strings byte for byte, which is the only reason the choice matters in practice.
Is my text uploaded when I encode it?
No. The base32 encode step runs in JavaScript in the tab and nothing is sent to a server. That makes the page safe for secrets, recovery codes and internal identifiers, and it keeps working offline once the page has loaded.
Why does my Base32 string contain no 0 or 1?
The RFC 4648 alphabet uses A–Z and 2–7 only. Zeros and ones are excluded because they are easily confused with O and I, and 8 and 9 are excluded because the alphabet stops at 7. A string containing them is not Base32 and will fail to decode.
Related tools
Base32 Decode reverses the format and shows the byte count behind a value, which is useful for checking a TOTP secret. Base64 Encode handles the more common alphabet when case-insensitive input is not required. Text to Base64 keeps the same UTF-8 pipeline without the Base32 length penalty. Every page here runs locally and needs no account at all, so a secret can be tested without sending it anywhere.