Base32 Encode / Decode
Free Base32 encoder and decoder: RFC 4648, extended hex and Crockford alphabets, optional padding and grouping, UTF-8 safe, with exact errors for bad input.
How to use Base32 Encode / Decode
- 1Choose Encode or Decode and pick an alphabet: RFC 4648, Extended hex or Crockford.
- 2Type or paste text, press Try example, or use Encode file for a file up to 25 MB.
- 3Copy the result or download it. Padding and groups of 4 or 8 characters are options.
What makes it better
- RFC 4648, extended hex and Crockford alphabets
- Optional = padding and spaces every 4 or 8 characters
- UTF-8 safe, so accents, Indian scripts and emoji survive a round trip
- Encodes files up to 25 MB
- Decode errors name the bad character and its position
About Base32 Encode / Decode
Base32 Encode / Decode turns text or a file into Base32 and decodes it again, entirely in your browser. Choose the RFC 4648 alphabet used by authenticator secrets, the extended hex alphabet that keeps sort order, or Crockford's human-friendly variant, then switch padding and grouping on or off. Bad input is never guessed at: the decoder names the invalid character and its position, or the length or padding problem.
Common uses
- Read or write the Base32 secret behind a TOTP authenticator setup key.
- Create short, case-insensitive identifiers that are easy to read aloud or type.
- Decode a Base32 value copied from a DNS record, an onion address or a config file.
- Check that a library produces the same Base32 as the RFC 4648 test vectors.
Example
Input
Hello World!
Result
JBSWY3DPEBLW64TMMQQQ====
Good to know
- Base32 is an encoding, not encryption: anyone can decode it, so it hides nothing. It makes the output about 60% larger than the input.
- Crockford Base32 has no padding and drops the letters I, L, O and U. When decoding, it reads I and L as 1, O as 0, and ignores hyphens and letter case.
- The decoder accepts lower case and spaces, and flags padding in the wrong place. A string that is valid in one alphabet may decode to different bytes in another, so match the alphabet to its source.
Base32 Encode / Decode FAQ
What is Base32 and when is it used?
Base32 writes binary data using 32 safe characters, five bits per character. It is common where case or look-alike characters cause trouble, such as authenticator secrets, DNS-safe labels and manual typing.
What is the difference between RFC 4648 and Crockford Base32?
RFC 4648 uses A to Z and 2 to 7 and pads with =. Crockford uses 0 to 9 and most letters, skips I, L, O and U to avoid confusion with digits, and normally has no padding.
What is extended hex Base32?
It is the RFC 4648 variant that uses 0 to 9 and A to V. Because its characters sort in the same order as the bytes they encode, encoded values keep their sorting order.
Why does my Base32 end with = signs?
Base32 works in blocks of eight characters, so the last block is filled up with = when the data does not divide evenly. Many tools drop the padding; this decoder accepts both forms.
Why does the decoder say my length is invalid?
After the last full group of eight characters, only 2, 4, 5 or 7 characters can remain. Any other count means characters were cut off or added, and the message tells you how many are left over.