Base32 Encoder/Decoder
Decode and encode Base32 — RFC 4648, base32hex and Crockford, strict or tolerant — entirely on this device.
Whitespace, lowercase, missing padding and non-zero trailing bits become position-anchored errors.
Press ? for shortcuts
Do it offline:$ base32 -d encoded.txt
How to use it
- Pick the variant — Base32 (RFC 4648), base32hex or Crockford — and paste. Decoding runs as you type, with every applied tolerance listed as a chip under the output.
- The output pane names what it holds: readable UTF-8 stays text; non-text bytes open a hex view with offset and ASCII columns and a download typed from the bytes themselves.
- Turn on Strict when the question is conformance rather than recovery: whitespace, lowercase, missing padding and stray trailing bits then fail at their exact positions.
- Swap with the Encode tab or the s key — a padded paste flips the badge to Detected: Base32, still clickable to override — and on encode the Padding toggle controls the trailing =.
Paste Base32 and the decoded bytes appear as you type — clean UTF-8 as text, anything else in an honest hex view. Three alphabets sit one switch apart: RFC 4648 standard, base32hex and Crockford with its look-alike folding. The tolerant default accepts lowercase, missing padding and wrapped lines, declaring every repair as a chip; strict mode turns each into a position-anchored refusal. Encoding runs the other way, on this device only.
Examples
foobarMZXW6YTBOI======The RFC 4648 §10 test vector, encoded. Six bytes are forty-eight bits — ten characters of five bits each — and six = signs complete the second eight-character quantum.
CPNMUOJ1E8======foobarThe same six bytes under the §7 extended-hex alphabet, which sorts encoded strings exactly like their bytes — the property DNSSEC's NSEC3 records rely on.
D1JP-RV3F-41VP-YWKC-CGhello worldCrockford permits hyphens as visual grouping. The decoder skips all four and reports exactly that: Separators were ignored ('-' ×4).
mzxw6ytboifoobarTolerant repair, itemized: nine letters folded to uppercase, missing padding accepted — one chip each. Strict instead stops at the first lowercase character, position 1.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Why final groups of 1, 3 or 6 are fatal
Each character carries five bits; whole bytes only complete at final groups of 2, 4, 5 or 7 characters. A remainder of 1, 3 or 6 strands a fraction of a byte no encoder can emit, so the length check refuses before decoding — usually a truncated paste.
Two spellings of one byte
MY====== and MZ====== decode to the same byte, 0x66: two characters hold ten bits and only eight become output. RFC 4648 §3.5 requires the leftover pair to be zero, so the tolerant default discards Z's remainder and names the canonical Y; strict mode refuses at that character.
A 0 or 1 usually means the wrong alphabet
Standard Base32 uses digits 2–7 only; base32hex starts at 0; Crockford folds look-alikes. When a decode fails and a sibling alphabet accepts the same input, the probe names the working variant inside the error — switching remains your click.
What Crockford trades for typability
Crockford reads I, i, L and l as 1 and O or o as 0, aggregating the folds into one counted chip. It never pads, ignores hyphens, and leaves U out of the alphabet — a pasted = or U fails at its position instead of decoding into something unintended.
Padding may only close a value
A = ends the final quantum, so any data character after one means two values were glued together — a joined log field, usually. The error anchors at the first =, leaving the split to you.
Common errors
Invalid Base32: character '1' at position 8 — this input decodes as base32hex; switch the variant to base32hex.- Digits 0, 1, 8 and 9 never occur in standard Base32, so decoding stops at the 1. The probe then found a sibling alphabet that accepts the whole input and named it — change the variant and the same paste decodes.
Base32 length is invalid — a final group of 1 character can never occur (valid remainders are 2, 4, 5 and 7)- Nine characters is one past a complete quantum, and a lone trailing character cannot carry a byte. Something was cut in transit — recover the missing tail rather than deleting the ninth character.
Input is larger than the 16 MB limit for this tool. For bigger payloads use the CLI: base32 -d encoded.txt- Past the cap the page refuses outright — no truncation, no partial decode, input untouched. The printed coreutils command streams files of any size instead.
FAQ
How is Base32 different from Base64?
Base64 stores six bits per character — three bytes become four characters; Base32 stores five, so five bytes become eight, roughly 60% growth instead of 33%. In exchange the alphabet has one letter case and no URL-hostile symbols, so it survives case-insensitive channels: DNS names, case-blind file systems, values people read aloud.
Why are authenticator (TOTP) setup keys Base32?
Because people type those keys by hand. The otpauth convention ships the shared secret as unpadded Base32 — no 0, 1, 8 or 9 to mistake for letters, one letter case, nothing shifted. Treat a setup key like the password it is: this page decodes on this device only, and input recognized as credential-shaped is never written to the between-visits buffer.
What does Crockford Base32 actually change?
It re-cuts the alphabet for humans: digits first, letters minus I, L, O and U. The first three fold back from look-alikes on decode; U stays out to avoid accidental obscenities. No padding, optional hyphens. Right for ULIDs and hand-typed codes — data bound for RFC 4648 systems should stay standard.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Re-run the conversion without waiting for the debounce.
- ⌘/Ctrl + S
- Download the output pane's contents as a file.
- ⌘/Ctrl + C
- Copy the decoded or encoded result when nothing is selected.
- ⌘/Ctrl + Shift + C
- Force-copy the result over any live selection.
- s
- Flip the direction — decode to encode and back.
- t
- Cycle the color theme (single-key kill switch applies).
- ? or ⌘/Ctrl + /
- Show the shortcut sheet with its browser-conflict notes.
- Esc
- Close the open dialog; the input stays put.