RFC 4648 / Base32 to bytes

Base32 decoder

Decode standard Base32 with deliberate padding rules, strict UTF-8 validation, and an exact hexadecimal view for binary data.

01 / Decode

Base32 input

Mode Decode

If padding is present, its length and final zero bits are always checked.

Allows spaces, tabs, and ASCII line breaks. Other non-alphabet characters are still rejected.

0 / 250,000 characters

Uses the standard A–Z and 2–7 alphabet. Lowercase is accepted. Digits 0, 1, 8, and 9 are not Base32 symbols.

Keyboard shortcut: Ctrl+Enter or Command+Enter decodes.

Ready to decode.

02 / Result

Decoded output

No result yet
Output view
0 bytes

UTF-8 view uses fatal decoding: malformed UTF-8 is never replaced silently. Hex view uses uppercase byte pairs and 16 bytes per line.

03 / Reference

What this decoder checks

  1. Read five-bit symbols. RFC 4648 Base32 maps A–Z and 2–7 to values 0–31. Case does not change those values.
  2. Validate the final quantum. Padded input must end with exactly 1, 3, 4, or 6 equals signs where required. Impossible lengths and non-zero unused bits are rejected.
  3. Keep bytes distinct from text. Decoding first produces bytes. Text view accepts only well-formed UTF-8; otherwise the exact bytes remain available in hexadecimal.

Known RFC check

MZXW6YTBOI====== decodes to foobar. With omitted padding allowed, JBSWY3DP decodes to Hello.

Limits and cautions

  • This implements standard RFC 4648 Base32 only. It does not reinterpret Crockford Base32, z-base-32, or the RFC 4648 base32hex alphabet.
  • Strict mode requires canonical padding. Optional-padding mode accepts the same valid final lengths without equals signs, but still rejects malformed padding and non-zero unused bits.
  • ASCII whitespace is rejected unless the checkbox is selected. Punctuation, Unicode whitespace, and every other non-alphabet character are always rejected.
  • Input is limited to 250,000 characters and 200,000 Base32 symbols. Decoded output is limited to 125,000 bytes so text and hex rendering stay responsive.
  • Base32 is reversible encoding, not encryption. Decoded TOTP secrets and other binary keys remain sensitive even when the UTF-8 view cannot display them.