Base32 Encode and Decode
ED-04Paste text and click Encode to get Base32, or paste Base32 and click Decode to read it. It follows RFC 4648 and handles accents and emoji as UTF-8.
Runs in your browser. Nothing is uploaded.
Text or Base32
Result
How to use it
- Paste text or Base32 into the box. Sample loads an example.
- Click Encode for text to Base32, or Decode for Base32 to text.
- Choose the standard alphabet (A-Z, 2-7) or the extended hex alphabet (0-9, A-V), and use the same one to decode.
- Untick Add = padding to leave the padding off, then copy the result or download it.
What Encode and Decode accept
Encode turns your text into UTF-8 bytes and then into Base32, so accents and emoji work. Padding with = to a multiple of 8 characters is on by default and optional, and lowercase output is available. Decode ignores spaces and line breaks, reads lowercase, and does not need padding, but it rejects characters outside the chosen alphabet, a misplaced =, and lengths that cannot occur. Use the same alphabet for decoding that was used to encode.
Standard and extended hex alphabets
RFC 4648 defines two alphabets. The standard one uses A to Z and 2 to 7, which avoids digits that look like letters, and is the one most systems mean by Base32. The extended hex alphabet uses 0 to 9 and A to V, so encoded values keep the same sort order as the raw data. This tool does not do Crockford Base32 or other variants some systems define. Base32 is an encoding, not encryption.
Decoding data that is not text
Many Base32 strings, such as the secret in a two-factor setup code, hold random bytes rather than text. Plain decoding would fail on those with a message that the bytes are not UTF-8 text. Tick Decode to hex bytes to see the raw bytes as hex instead. Hex output is shown for any input, so it is also a way to check what a Base32 value contains.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Not valid Base32: "1" is not in the standard (A-Z, 2-7) alphabet. | The input has a character outside the chosen alphabet. The message names it. 0, 1, 8 and 9 are never valid in the standard alphabet. | Remove or correct that character, or switch Alphabet if the text came from a hex-alphabet system. |
Not valid Base32: the length is impossible (a stray character at the end). | Base32 text can only end after 2, 4, 5 or 7 leftover characters. One, three or six leftover characters cannot come from real data. | Check that the string was copied completely, with no missing or extra character. |
Not valid Base32: padded input must be a multiple of 8 characters. | The input has = padding but its total length is not a multiple of 8. | Add or remove = signs so the length is a multiple of 8, or delete the padding entirely. |
Not valid Base32: "=" padding may only appear at the end. | An = sign sits in the middle of the text. | Remove the = sign, or check that two Base32 strings were not joined together. |
The decoded bytes are not UTF-8 text (probably binary data). | The Base32 is valid, but the bytes inside it are not readable text. | Tick Decode to hex bytes to see the bytes as hex. |
Questions people ask
How do I encode text to Base32 online?
Paste your text into the box and click Encode. The Base32 appears using the standard RFC 4648 alphabet, padded with = unless you untick that option. Copy it or download it as a .txt file. The conversion runs in your browser.
How do I decode a Base32 string?
Paste it into the box and click Decode. Spaces and line breaks are ignored, lowercase is accepted, and padding is optional. If the string came from an extended hex system, switch the alphabet first. If the bytes are not text, tick Decode to hex bytes.
What is the difference between Base32 and Base64?
Base64 uses 64 characters and is about 33 percent bigger than the data, while Base32 uses 32 characters and is about 60 percent bigger. Base32 is longer but avoids lowercase and symbols, so it survives case-insensitive systems and is easier to read aloud or type.
Why does Base32 have = signs at the end?
Base32 works in groups of 40 bits, which become 8 characters. When the data does not fill the last group, = signs pad the output to 8 characters. Many systems drop the padding, and this tool lets you encode without it and decode with or without it.
Why does decoding my Base32 say the bytes are not UTF-8 text?
The Base32 holds binary data, not readable text, so there is nothing to show as characters. Secrets for authenticator apps are a common example. Tick Decode to hex bytes to see the bytes as hex instead.
Is this Crockford Base32?
No. This tool implements the two alphabets in RFC 4648, standard and extended hex. Crockford Base32, which skips letters such as I, L, O and U, uses a different alphabet and gives different output. ULIDs use Crockford, so use the ULID Generator for those.
About this tool
Follows RFC 4648: the standard alphabet (A-Z and 2-7) or the extended hex alphabet (0-9 and A-V), with or without "=" padding. Text is converted to UTF-8 bytes first, so accents and emoji work. Decoding ignores spaces and line breaks, accepts lowercase, and does not require padding, but it rejects characters outside the chosen alphabet and lengths that cannot occur. Pick the same alphabet for decoding that was used to encode. If the Base32 holds binary data, such as an authenticator secret, tick "Decode to hex bytes" to see it as hex instead of getting a not-UTF-8 error. This is the RFC 4648 alphabet, not Crockford Base32 and not the Base32 variants some other systems define. Base32 is an encoding, not encryption.