Base32: Three Alphabets, Padding and Line-by-Line Mode

Open Tool Base32 Encoder and Decoder

Why Base32 instead of Base64

Base32 uses 32 characters, most commonly the RFC 4648 table of A to Z plus 2 to 7 — all uppercase, with none of the confusable 0, 1, 8 and 9. The price is length: the same payload runs about 60 percent longer than Base64 because each character carries only 5 bits. What you buy is reliability when a human copies by hand, reads aloud over the phone, or types a printed recovery code. Two-factor backup codes, device pairing codes and some application recovery keys make exactly that trade.

Choosing an alphabet

The RFC 4648 table is A-Z and 2-7, the most common default in libraries. z-base-32 reorders letters to favour lowercase and legible characters for manual entry. Crockford drops I, L, O and U and treats I and L as 1 and O as 0 on decode, so it forgives typos best and suits dictation. All three produce different strings for the same bytes, and encoding and decoding must use the same table or you get garbage.

Operating details

  1. Pick the direction: encode or decode.
  2. Pick the alphabet: RFC 4648, z-base-32 or Crockford. On decode this choice decides everything.
  3. Input format tells the tool whether you pasted text or a hex byte string; getting it wrong breaks decoding.
  4. Enable output padding to append equals signs up to a multiple of 8, as RFC requires. Leave it off for cleaner strings.
  5. Lowercase output suits case-insensitive systems; decoding normally normalizes case for you.
  6. For multiple records, enable line-by-line mode so each line is encoded or decoded independently.
  7. Click Process, or Load example to try a sample first. Clear resets both panes.

Troubleshooting

Garbled output almost always means the alphabet does not match the encoder. A trailing run of equals is normal padding, not an error, and you need not strip it before pasting. A length error usually means the character count is not a multiple of 8 and padding is missing; re-encode with padding on and decode again. If you see 0, 1, 8 or 9 inside the string, the data is not standard Base32 and was probably hand-modified.

⏫︎