b2KIT

Base32 Encoder / Decoder

Encode and decode data using Base32 (RFC 4648) with standard and hex alphabets.

Tested tool guide Tested browser tools Checked August 16, 2026

What Base32 Encoder / Decoder does, with a checked example

This tool converts between plain text and Base32, the 32-character encoding defined in RFC 4648. Paste text into the encode field to get its Base32 form, or paste Base32 into the decode field to recover the original text. The common surprise is that Base32 output is case-insensitive (the alphabet uses A-Z and 2-7), so 'MZXW6===' and 'mzxw6===' decode identically. Also, padding with '=' is optional but often expected.

Worked example

A concrete input and expected output from the current implementation.

Input

Hello

Expected output

JBSWY3DP

The ASCII bytes of 'Hello' (48 65 6C 6C 6F) are grouped into 5-bit chunks, each mapped to a Base32 character. The resulting 8 characters are 'JBSWY3DP' with no padding needed because the input length is a multiple of 5 bytes.

How the result is produced

1

Encoding process

The tool takes each character of your input, converts it to its byte value (UTF-8), and concatenates those bytes into a bit stream. It then splits that stream into groups of 5 bits, each group becoming an index into the Base32 alphabet (A-Z then 2-7). If the final group has fewer than 5 bits, zero bits are appended and '=' padding is added to make the total length a multiple of 8.

2

Decoding process

For decoding, the tool maps each Base32 character back to its 5-bit value, ignoring whitespace and treating lowercase letters as uppercase. It concatenates those bits, then splits them into 8-bit bytes. If padding '=' is present, it signals that the last byte is incomplete, and the tool strips the extra bits. The resulting bytes are interpreted as UTF-8 text.

Good uses

  • Encoding a secret key or token before pasting it into a configuration file that expects Base32 (for example, TOTP setup keys).
  • Decoding a Base32 string from a URI 'secret' parameter to see the raw bytes, often for debugging an authenticator app.
  • Converting binary data (like a small file's bytes) into a printable ASCII form for transmission over protocols that only handle text.

Limits and checks

  • Base32 is case-insensitive but not whitespace-tolerant in all tools; this one ignores whitespace, but some users paste with newlines and get confused when other decoders fail.
  • The hex alphabet variant uses 0-9 and A-V instead of A-Z and 2-7, so a string from that variant will not decode correctly unless you switch the option.
  • Decoding a string that is incorrectly padded (e.g., too many '=') may produce an empty result or an error. Verify the length is a multiple of 8 or remove padding before decoding.

Common questions

Why does my decoded output show garbled characters instead of my original text?

That usually means the input was not valid Base32, or you used the wrong alphabet or padding. Base32 only uses letters A-Z and digits 2-7 (or 0-9 and A-V for hex). If the string has other characters, the tool may ignore them or fail. Also ensure the text is not URL-encoded; decode that first.

Is Base32 the same as Base64?

No. Base32 uses a 32-character alphabet and produces output about 60% larger than the original, while Base64 uses 64 characters and is about 33% larger. Base32 is often used where case-insensitivity or avoiding similar-looking characters (like 0/O, 1/I) matters, such as in verification codes. This tool only does Base32; use a separate Base64 tool for that.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools