Base32 Encoder / Decoder

Encode and decode Base32 โ€” RFC 4648, Base32hex or Crockford โ€” for text or hex.

About this tool

Choose encode or decode, the alphabet and whether the bytes are UTF-8 text or hex, then type or paste. The output updates as you type, with a byte and character count. Decoding validates every character and shows hex if the result is not valid text. Switching between encode and decode feeds the output back in, so you can check a round trip.

How Base32 works

Base32 turns bytes into text using 32 safe characters. The standard RFC 4648 alphabet is Aโ€“Z and 2โ€“7. Every 5 bytes (40 bits) become 8 characters of 5 bits each, and the output is padded with = to a multiple of 8. The RFC's own test vector shows this: "foobar" encodes to MZXW6YTBOI======. Base32 output is about 60% larger than the input, against 33% for Base64, but it uses a single case and avoids symbols, so it survives case-insensitive systems, URLs, DNS names and being read aloud. That is why it is used for the secret keys in authenticator apps (TOTP), for onion addresses and for some file names. Base32hex, from section 7 of the same RFC, uses 0โ€“9 and Aโ€“V so encoded values sort in the same order as the raw data. Crockford's Base32 drops I, L, O and U to avoid misreading and accepts I and L as 1 and O as 0 when decoding, which suits codes that people type. The Base64 encoder, the number base converter and the TOTP generator are related. What Base64 is, and what it is not explains the sister encoding.

Frequently asked questions

What is Base32 used for?

Authenticator app secret keys (TOTP), onion addresses, DNS-safe identifiers and anywhere text must be case-insensitive and easy to read aloud.

What does the = padding mean in Base32?

Base32 works in blocks of 8 characters. = fills the last block when the input isn't a multiple of 5 bytes. Some systems omit it; this tool decodes either way.

What is the difference between Base32 and Base64?

Base64 uses 64 characters including both cases, + and /, and is more compact. Base32 uses 32 case-insensitive characters and is about 60% larger than the input.

Is my data saved?

No. Encoding and decoding run in your browser and nothing is stored or sent.