GALAXY OF TOOLS

DEV SECTOR

Base32 Encoder / Decoder

Encode or decode Base32 in the browser: RFC 4648, base32hex and Crockford, with text, hex or Base64 bytes.

6 bytes → 16 characters

The conversion happens as you type, in this tab only; nothing is uploaded. Decoding ignores spaces, line breaks and letter case.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Base32 decode and encode in your browser

Use this Base32 encoder and decoder to turn text, hex bytes, Base64 data or a whole file into Base32 and back. Base32 spells binary data with just 32 characters, which makes it safe for case-insensitive systems, file names, DNS labels and values that people read aloud or type by hand. It is the format behind the secret keys in authenticator apps (TOTP/HOTP), the encoding of Tor onion addresses and many ID schemes.

Three alphabets are supported. The default is the RFC 4648 alphabet (A–Z and 2–7). Base32hex uses 0–9 and A–V, so encoded strings sort in the same order as the data. Crockford’s Base32 leaves out I, L, O and U to avoid misreading, accepts look-alike letters when decoding and normally has no padding.

Decoding is forgiving about spaces, line breaks and lowercase, and precise about real problems: an invalid character is named with its position, and an impossible length is explained instead of silently producing wrong bytes.

How to use the Base32 Encoder / Decoder

  1. Pick Encode or Decode and choose the Alphabet.
  2. For encoding, choose whether the input is text, hex bytes or Base64 bytes, or press Encode a file. For decoding, choose how to show the bytes: text, hex or Base64.
  3. Paste or type the input. The result appears as you type.
  4. Set Padding (add = or none), letter case and line length when encoding. Tick Strict when decoding to enforce RFC 4648 padding and canonical form.
  5. Press Copy result or Download. Use result as input flips the direction so you can check a round trip.

Base32 Encoder / Decoder features

Three alphabets

RFC 4648, base32hex and Crockford, each tested against published vectors.

Text, hex, Base64 and files

Encode UTF-8 text, hex or Base64 bytes or any file, and decode to text, hex, Base64 or a downloadable file. “Base32 to hex” is a decode with hex output.

Padding control

Add or omit the trailing = characters. Decoding accepts both, and Strict mode checks the count.

Clear error messages

Invalid characters, wrong lengths, data after the padding and non-zero spare bits are each reported in plain language.

Layout options

Lowercase output and fixed line lengths for pasting into configuration files.

RFC 4648 test vectors

The RFC defines these results for the ASCII strings in the first column (RFC 4648 section 10). The tool’s self-check runs every row for both alphabets.

InputBase32Base32hex
fMY======CO======
foMZXQ====CPNG====
fooMZXW6===CPNMU===
foobMZXW6YQ=CPNMUOG=
foobaMZXW6YTBCPNMUOJ1
foobarMZXW6YTBOI======CPNMUOJ1E8======

How Base32 works

Every 5 bytes (40 bits) are split into eight 5-bit groups, and each group picks one of 32 characters. That makes the output about 60% longer than the input, compared with 33% for Base64. When the input is not a multiple of 5 bytes, the last group is padded with = up to 8 characters; the number of = is 6, 4, 3 or 1 for inputs ending in 1, 2, 3 or 4 spare bytes. Crockford’s variant omits padding. Crockford also describes an optional check symbol for encoding numbers; this tool encodes bytes and does not add one.

Common uses and mistakes

  • Authenticator secrets: the key in an otpauth:// link is Base32. Decode it to hex to compare with a server value, or use the OTP Generator to produce codes from it.
  • Wrong alphabet: text that contains 0, 1, 8 or 9 is not standard Base32. Try base32hex or Crockford.
  • Base32 is not encryption. Anyone can decode it; use it for transport, not secrecy.
  • Base64 vs Base32: see the Base64 Encoder when size matters more than case-insensitivity; for other number systems use the Number Base Converter.

Base32 Encoder / Decoder FAQ

How do I decode Base32 online?

Choose Decode, pick the alphabet, paste the Base32 text and read the result. Spaces, line breaks and lowercase are ignored. If the bytes are not text, show them as hex or Base64, or download them.

How do I convert Base32 to hex?

Choose Decode, paste the Base32 and set “Show decoded bytes as” to Hex. For the reverse, choose Encode and set “Input is” to Hex bytes.

What is the difference between Base32 and base32hex?

They use the same bit layout and padding but different alphabets. Base32hex uses 0–9 and A–V so that encoded strings sort like the original data; standard Base32 uses A–Z and 2–7.

Why does decoding say the length is wrong?

Valid Base32 ends with a group of 2, 4, 5 or 7 characters (or a full group of 8). Any other length means characters were lost when the text was copied.

Is Base32 case-sensitive?

The encoding itself is defined with upper-case letters, but decoders commonly accept lowercase. This tool accepts both and can output lowercase.

Is my data sent to a server?

No. Encoding and decoding run in your browser, and files are read locally.

You might also need