Encode text or a file to Base32 or decode it: standard, Hex, Crockford or z-base-32
Convert text or any file to Base32 and back, in RFC 4648’s two alphabets, Crockford’s or z-base-32. Decoding takes lower case, spaces, hyphens and missing padding, the way authenticator apps show a secret; bytes that aren’t text show in hex.
How to use it
Choose Encode or Decode, and the alphabet: A–Z 2–7 (the standard one), Hex, Crockford or z-base-32. To encode without the = at the end, turn Padding off. Paste your text or Base32, or open a file: to encode, any file works, an image or a key as well as text. Spaces, hyphens, line breaks and lower case are fine when decoding. Copy the result. Decoded bytes that aren’t text show in hex when short, and Download saves them as a file; Show as writes them in hex, decimal, binary or Base64 instead.
Examples
Encode text
Hello, world!
JBSWY3DPFQQHO33SNRSCC===
Every 5 bytes become 8 characters; = fills the last group.
Decode a TOTP secret
JBSW Y3DP EHPK 3PXP
Binary data, 10 bytes (application/octet-stream). Download saves it as decoded.bin. Hex: 48 65 6c 6c 6f 21 de ad be ef
A secret is random bytes, not text, so it shows in hex.
Decode Crockford Base32 with look-alike letters
91jp-rv3f-41vp-ywkc-cggg
Hello world!
Crockford’s alphabet: lower case is fine, hyphens between groups are skipped, and O, I and L would read as 0, 1 and 1.
Where Base32 is used
Standard and Hex alphabets
Sources: RFC 4648 §3.5 and §6, Douglas Crockford: Base32, z-base-32
Questions
- Why does my secret decode to binary data?
TOTP secrets are random bytes, not text. The result shows them in hex, and Download saves the bytes as a file. - Does it read Crockford’s Base32?
Yes: pick Crockford. It decodes lower case, hyphens and the look-alikes O, I and L, and encodes without padding. A ULID is one 128-bit number written in that alphabet rather than bytes, so this page doesn’t turn it into a time. - Is my data uploaded?
No. Everything runs in your browser, so your data stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first. Two-factor secrets give access to an account: keep them out of chats and tickets.