Productivity and Utilities

Base32 Encoder and Decoder

Type text or hex to encode it as Base32, or paste Base32 to decode it, with a choice of alphabet and padding.

Your numbers

Direction

Result

Base32 text

JBSWY3DPFQQHO33SNRSA====

Bytes
12
Base32 length
24 characters
Size change
2 characters per byte
Bytes as hex
48656c6c6f2c20776f726c64
How this was calculated
  1. The bytes are written as one long string of bits, then cut into groups of 5 bits. Each group is a number from 0 to 31.
  2. Each number is replaced by a character: 0 to 25 are A to Z, and 26 to 31 are 2 to 7.
  3. If the last group has fewer than 5 bits it is filled with zero bits. With padding on, = signs are added until the length is a multiple of 8.
  4. Decoding ignores case, spaces and hyphens. It rejects characters outside the alphabet and a leftover group whose unused bits are not zero.
  • Base32 is a way to write bytes as text, not encryption. It is longer than Base64 but uses only one case and avoids look-alike symbols.

Calculated using SumPanda.com · https://sumpanda.com/base32-encoder-decoder/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the base32 encoder and decoder

  1. Choose Encode or Decode, and the alphabet: RFC 4648 (A to Z and 2 to 7) or extended hex (0 to 9 and A to V).
  2. To encode, type text or enter hex bytes, and choose whether to add `=` padding.
  3. To decode, paste Base32. Case, spaces and hyphens are ignored.
  4. Read the encoded or decoded result, the byte count and the bytes as hex.

Formula

write the bytes as a stream of bits and cut it into 5 bit groups (values 0 to 31)

RFC 4648 alphabet: 0 to 25 = A to Z, 26 to 31 = 2 to 7

extended hex alphabet: 0 to 9 = 0 to 9, 10 to 31 = A to V

with padding, = signs are added until the length is a multiple of 8

The last group is filled with zero bits when it is short. Every 5 bytes become 8 characters, so Base32 grows data by 60%.

The word "foobar"

The six bytes of "foobar" are 66 6f 6f 62 61 72. As 48 bits they split into ten 5 bit groups and a leftover of 3 bits, which is filled with zeros to make an eleventh group. In the RFC 4648 alphabet the result is MZXW6YTBOI with six = signs of padding, so MZXW6YTBOI======.

With the extended hex alphabet the same bytes encode to CPNMUOJ1E8======. Without padding, the encoding is MZXW6YTBOI. Decoding MZXW6YTBOI====== returns foobar. The encoding for "f" alone is MY====== in the standard alphabet.

Why use Base32

Base32 uses only one case of letters and the digits 2 to 7, which avoids look-alikes such as 0 and O or 1 and l. That makes it good for codes that people read aloud or type, and it survives systems that ignore the case of a file name. One-time password secrets are commonly shared in this form.

Strict decoding

The decoder rejects characters outside the alphabet, padding of the wrong length and unused bits that are not zero, because those cannot come from a valid encoding. Base32 is a way to write bytes as text, not encryption. See also the Base64 Encoder and Decoder, the Ascii85 Encoder and Decoder and the Number Base Converter. All work happens in your browser.

Assumptions and limits

  • Text is encoded as UTF-8 bytes.
  • Input is limited to 200,000 characters.
  • Crockford and other Base32 variants are not included.
  • Nothing is sent from your device.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is the difference between the two alphabets?

The RFC 4648 alphabet is A to Z and 2 to 7. The extended hex alphabet is 0 to 9 and A to V, which keeps the sort order of the encoded text the same as the order of the bytes.

Is padding required?

Padding with = brings the length to a multiple of 8. Many systems omit it. The decoder accepts input with or without padding, as long as any padding that is present is valid.

Why does decoding fail on lowercase letters?

It does not. The decoder converts to upper case first, so lower case input works. Failures come from characters outside the alphabet, such as 0, 1, 8 and 9 in the standard alphabet.

Can I decode a one-time password secret?

Yes, but treat such a secret with care. The page runs in your browser and does not send it anywhere, but avoid pasting real secrets on a shared computer.