Base32 Encoder & Decoder
Convert text to Base32 and back.
What is Base32?
Base32 represents data using 32 characters: the letters A to Z and the digits 2 to 7. It is longer than Base64 but avoids easily confused characters and is case-insensitive, so it is used for things people type, such as one-time-password secrets.
How to use it
- Type or paste text into the box.
- Press Encode or Decode.
- Copy the output.
Example
The word Hello encodes to:
JBSWY3DP
Common use cases
- Reading TOTP and authenticator secrets.
- Debugging identifiers that use Base32.
- Comparing Base32 with Base64 output.
How the encoding works
Base32 reads your input as a stream of bits and cuts it into groups of five. Each group of five bits (a number from 0 to 31) is looked up in the alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ234567. Five bytes are 40 bits, which is exactly eight Base32 characters, so output grows by about 60 percent: every 5 input bytes become 8 characters.
When the input length is not a multiple of five bytes, the last group is padded with zero bits and the output is padded with = signs until its length is a multiple of eight. This tool always writes that padding when encoding. The padding is cosmetic, because a decoder can work out the real length without it, and this tool strips trailing = before decoding, so padded and unpadded input both decode correctly.
The padding length tells you how many bytes were in the final group. Verified examples:
a -> ME====== ab -> MFRA==== abc -> MFRGG=== abcd -> MFRGGZA= abcde -> MFRGGZDF Hello, World! -> JBSWY3DPFQQFO33SNRSCC===
Decoding a shared secret
Authenticator apps show a setup key such as JBSWY3DPEHPK3PXP. Paste it into the box and press Decode. The tool upper-cases the input and ignores spaces, so a key shown in groups of four (jbsw y3dp ehpk 3pxp) works as typed. That key decodes to the bytes of Hello! followed by DE AD BE EF, and because the last four bytes are not printable text you will see replacement characters at the end of the output.
That is expected, not an error. TOTP secrets are random bytes, not text, and this tool always interprets decoded bytes as UTF-8 text. It is useful for confirming that a string is valid Base32 and for decoding text payloads, but it cannot show you a raw binary value as hex. If you need to inspect binary bytes, use the Unicode inspector or a hex tool alongside it.
Limits and common mistakes
- Only the RFC 4648 alphabet is supported. Crockford Base32, z-base-32 and the extended-hex variant (
0-9A-V) use different alphabets and will decode to nonsense or raise an error. - Characters outside
A-Zand2-7cause the message Invalid Base32 character naming the first bad one. The digits 0, 1, 8 and 9 are the usual culprits, typically a mistyped O, I or B. - Encoding works on the UTF-8 bytes of your text, so
cafébecomesMNQWNQ5J, five bytes for four characters. - Files cannot be loaded. The tool works on text typed or pasted in the box.
- Lower-case output is not produced. If a system expects lower-case, convert it yourself.
Frequently asked questions
What is Base32 used for?
Human-friendly encodings such as authenticator secrets.
Base32 or Base64?
Base64 is shorter; Base32 is easier to read aloud and type.
Is Base32 encryption?
No. Anyone can decode it.
Is my data uploaded?
No. This tool runs entirely in your browser, so what you type or paste is not sent to our servers.
Why does my Base32 string end with equals signs?
They pad the output to a multiple of eight characters. A single 'a' gives ME====== (six signs); 'abcde' needs none because five bytes fill the block exactly.
Can I decode a TOTP secret to see the key bytes?
Only partly. This tool shows the decoded bytes as UTF-8 text, so random key bytes appear as unreadable characters. It does confirm whether the secret is valid Base32.