Base32 Decoder

Base32 decode an RFC 4648 string back to text with this Base32 decoder. Paste a Base32 example, secret, or backup code and the tool ignores spaces and letter case before decoding. If the input is invalid Base32, it reports the problem; the page also explains Base32 vs Base64 so you can tell the two encodings apart.

Base32 decode turns an RFC 4648 string back into readable plain text, ignoring spaces and letter case so a secret copied from a printout or a ticket still works, because the bytes are rebuilt in your browser tab.

It is the tool for checking an authenticator setup key, for reading an identifier that a support system stored in Base32, and for confirming that a value scanned from a QR code matches the one on screen. Paste the string and the decoder on this page returns the text, or a precise error when the string cannot represent whole bytes. The decoded output is copied literally, including control characters, so a secret shows up as raw key material rather than a tidy word.

How to use

  1. Paste the Base32 value. Paste into the input box; spaces, tabs and line breaks are removed before decoding. Lower case is accepted and treated as upper case, so a value copied from a phone keyboard works without cleanup.
  2. Check the sample if unsure. Sample loads NBSWY3DP, which a base32 decode turns into hello. Comparing the sample with your own value shows whether a problem is in the input or in the expectations.
  3. Copy the decoded text. Copy places the result on the clipboard and Download saves decoded.txt. If the value is a TOTP secret, the decoded bytes are usually raw key material rather than readable words.

Decoding rules and common failures

Base32 looks forgiving, but three rules decide whether a string decodes. Each one produces the same terse error, so the details below save a round of guessing.

What the base32 decoder checks first

Characters outside A–Z and 2–7 are rejected immediately. Whitespace is stripped, so NBSW Y3DP still decodes. A body whose length leaves one, three or six characters modulo eight cannot produce whole bytes and fails: NBSWY3 (six characters) is invalid, while the eight-character NBSWY3DP decodes to five bytes, hello. Padding is optional, so both the padded and the bare form of the same value are accepted. Decoding is a byte operation, so a key produces unreadable binary rather than words even when every character is correct.

Base32 vs base64 in one comparison

Both formats use RFC 4648, but Base32 spends five bits per character and Base64 spends six. The five-byte word hello needs eight Base32 characters (NBSWY3DP) or eight Base64 characters (aGVsbG8=), and the Base64 string includes padding. Output grows by roughly 60% in Base32 against 33% in Base64, which is the price of an alphabet that survives case folding and handwriting. A 20-byte secret is 32 Base32 characters but only 28 Base64 characters, which is why setup strings look longer than the keys they hold.

Fixing invalid base32 without guessing

Input is not valid Base32. covers several causes. A stray 0, 1, 8 or 9 belongs to the wrong alphabet. More than six = signs, or padding that does not complete an eight-character group, breaks the padding rule. A body that ends with leftover bits set to one also fails, because those bits have no byte to belong to. Remove the bad characters and re-copy the value from the source. If you cannot see the problem, decode only the first eight characters; when those succeed, the damage is further along the string.

FAQ

Can you give a base32 example?

NBSWY3DP is hello, and MZXW6YTBOI====== is foobar. Both come from RFC 4648 and both work in the sample button. If a base32 decode of either string returns anything else, the input was edited before it reached the box.

Do I need the trailing equals signs?

No. This base32 decode page accepts padded and unpadded values, which matters for secrets that services distribute without padding. Keep the signs if a strict library on the other side expects them, and remove them only when the receiver documents that it does not.

Why does a valid-looking string fail?

One of four rules was broken: a character outside A–Z and 2–7, a body length of one, three or six modulo eight, more than six equals signs, or leftover bits that are not zero. A base32 decode attempt reports the input as invalid Base32 rather than guessing at a repair.

Is Base32 case sensitive when decoding?

No. The decoder uppercases the input before reading it, so a value typed in lower case decodes exactly like the uppercase form. Only the visible string changes; the bytes and the resulting text are identical.

Is the value sent to a server during decoding?

No. The base32 decode step runs in JavaScript on your device, the bytes stay in the tab, and the download is built from a local blob. Nothing is logged, which makes the page suitable for authenticator secrets and private identifiers.

Base32 Encode produces the strings this page reads and lets you try padding on or off before sharing a secret. Text to Base64 is the shorter alternative when case-insensitivity is not required, and Base64 Converter shows both directions of that format on one screen. Moving between the two alphabets is a re-encode, never a text edit, so run the base32 decode first and encode the recovered bytes with the other page.