ToolNimba Browse

🔠 Base32 Encode and Decode

By ToolNimba Editorial Team · Updated 2026-06-19

Type some text and press Encode.

This Base32 tool encodes text to Base32 and decodes Base32 back to readable text, both directions in one place. It uses the standard RFC 4648 alphabet (the uppercase letters A to Z and the digits 2 to 7) with = padding, and handles full UTF-8 so accented letters, emoji, and non-Latin scripts survive the round trip. Switch between Encode and Decode, copy the result with one click, or swap the output back into the input. Everything runs in your browser, so the text you paste never leaves your device.

What is the Base32 Encoder Decoder?

Base32 is a way of representing binary data using a set of 32 printable ASCII characters: the uppercase letters A to Z and the digits 2 to 7. The digits 0, 1, and 8 are deliberately left out because they are easy to confuse with the letters O, I, and B. That choice makes Base32 friendly for humans to read aloud, type, or write down, which is why it shows up in things like two-factor authentication secret keys and case-insensitive file identifiers.

The encoding works at the bit level. Each Base32 character carries 5 bits of information, because 2 to the power of 5 is 32. The encoder reads the input as a stream of 8-bit bytes, lines all those bits up end to end, then slices the stream into 5-bit groups. Each group is a number from 0 to 31, which maps to one character in the alphabet. Since 8 bits and 5 bits share a least common multiple of 40 bits, the algorithm settles into neat blocks of 5 input bytes producing 8 output characters. When the input does not fill a whole 40-bit block, the final group is padded with zero bits and the output is padded with = characters so its length stays a multiple of 8.

Base32 is not the same as Base64, and it is not encryption. Compared with Base64 it uses a smaller alphabet, avoids look-alike characters, and is case insensitive, but it produces longer output: Base32 inflates data by about 60%, versus roughly 33% for Base64. Like all such schemes it is fully reversible and uses no key, so anyone can decode it. This tool first converts your text to UTF-8 bytes, then groups those bytes into 5-bit chunks by hand, and reverses the process on decode, so multibyte characters round-trip correctly.

When to use it

  • Reading or generating the secret keys used by TOTP authenticator apps, which are shared in Base32.
  • Producing case-insensitive identifiers that survive systems which do not preserve upper and lower case.
  • Encoding binary data for environments where the + and / of Base64 would cause problems but readability matters.
  • Teaching or learning how bit-level encodings group data, since Base32 blocks are easy to trace by hand.

How to use the Base32 Encoder Decoder

  1. Choose Encode to turn text into Base32, or Decode to turn Base32 back into text.
  2. Type or paste your content into the input box. The result updates as you type.
  3. Read the encoded or decoded result, including any = padding on encode.
  4. Press Copy to copy the result, or Swap input and output to feed the result back through.

Formula & method

Convert the input to bytes, line up all the bits, slice them into groups of 5 bits, map each 5-bit value (0 to 31) to a Base32 character (A to Z then 2 to 7), then pad the output with = so its length is a multiple of 8.

Worked examples

Encode the word "Man" (3 bytes).

  1. ASCII bytes: M = 77, a = 97, n = 110.
  2. In bits: 01001101 01100001 01101110 (24 bits).
  3. Pad up to 25 bits, then slice into 5-bit groups: 01001 10101 10000 10110 11100 = 9, 21, 16, 22, 28.
  4. Map to alphabet: 9=J, 21=V, 16=Q, 22=W, 28=4, giving JVQW4.
  5. Pad the 5 characters out to a multiple of 8 with = signs.

Result: Man encodes to JVQW4===

Encode the single letter "M" (1 byte).

  1. ASCII byte: M = 77 = 01001101 (8 bits).
  2. Pad up to 10 bits with two zeros, then slice into 5-bit groups: 01001 10100 = 9 and 20.
  3. Map to alphabet: 9=J and 20=U, giving JU.
  4. One byte fills only 2 of the 8 characters, so add ====== padding.

Result: M encodes to JU======

Encode the 6-letter word "foobar" (a clean 40-bit fit at 5 bytes plus 1).

  1. UTF-8 bytes: f o o b a r = 6 bytes = 48 bits.
  2. The first 5 bytes (40 bits) map to a full 8-character block: MZXW6YTB.
  3. The remaining 1 byte maps to OI and is padded with ======.
  4. Concatenate the two blocks.

Result: foobar encodes to MZXW6YTBOI======

The RFC 4648 Base32 alphabet (index to character)

Index rangeCharacters
0 to 9A B C D E F G H I J
10 to 19K L M N O P Q R S T
20 to 25U V W X Y Z
26 to 312 3 4 5 6 7
Padding=

How input length maps to padding (per final block)

Input bytes left over (mod 5)Base32 charactersPadding =
0 (exact multiple of 5)8none
12======
24====
35===
47=

Sample text and its Base32 encoding (RFC 4648 test vectors)

InputBase32 output
fMY======
foMZXQ====
fooMZXW6===
foobMZXW6YQ=
foobaMZXW6YTB
foobarMZXW6YTBOI======

Common mistakes to avoid

  • Confusing Base32 with Base64. They are different schemes. Base32 uses 32 characters (A to Z and 2 to 7) and is case insensitive, while Base64 uses 64 characters including lowercase, +, and /. Feeding Base64 into a Base32 decoder fails because the alphabets do not match.
  • Including the digits 0, 1, or 8. Standard Base32 omits 0, 1, and 8 to avoid confusion with O, I, and B. If you see those digits, the data is not RFC 4648 Base32 (it may be a different variant such as base32hex or Crockford Base32).
  • Treating Base32 as encryption. Base32 hides nothing. Anyone can decode it instantly, so never use it to protect passwords, tokens, or private data. Use real encryption when you need secrecy.
  • Dropping or mangling the = padding. RFC 4648 Base32 pads each final block with = so the length is a multiple of 8. Some systems strip padding, which can break strict decoders. This tool adds padding on encode and tolerates its absence on decode.

Glossary

Base32
An encoding that represents binary data using 32 characters (A to Z and 2 to 7), chosen to avoid look-alike symbols and to be case insensitive.
RFC 4648
The internet standard that defines Base16, Base32, and Base64 encodings, including the exact Base32 alphabet and padding rules.
Encoding
A reversible transformation of data into another format. Unlike encryption it uses no key and provides no secrecy.
Padding
The = characters added to the end of Base32 output so its length is always a multiple of eight.
Quantum
The natural block size of an encoding. For Base32 it is 40 bits (5 bytes in, 8 characters out).
UTF-8
The dominant character encoding for text. It represents each character as one to four bytes, which Base32 then groups into 5-bit chunks.

Frequently asked questions

What is Base32 encoding?

Base32 encoding represents binary data using 32 characters: the uppercase letters A to Z and the digits 2 to 7. Each character carries 5 bits. It is reversible, case insensitive, and provides no encryption or secrecy, just a text-safe way to carry data.

How is Base32 different from Base64?

Base32 uses a smaller, case-insensitive alphabet of 32 characters and avoids look-alike symbols like 0, 1, 8, +, and /. Base64 uses 64 characters and is more compact. Base32 output is about 60% larger than the input, while Base64 is about 33% larger.

How do I decode a Base32 string?

Paste the Base32 string, select Decode, and the original text appears instantly. This tool accepts upper or lower case and tolerates missing = padding, then returns the decoded UTF-8 text.

Why does Base32 output use padding with the = sign?

Base32 works in 40-bit blocks that produce 8 characters. When the input does not fill a whole block, the encoder adds = characters so the total length stays a multiple of 8. This keeps the format predictable for decoders.

Is Base32 secure or encrypted?

No. Base32 is an encoding, not encryption. Anyone can decode it without a key, so it offers no security. Never use it to protect passwords or sensitive data. Use proper encryption for secrecy.

Does this tool handle emoji and accented characters?

Yes. It converts your text to UTF-8 bytes before encoding and decodes back through UTF-8, so characters like é, ü, Japanese text, and emoji round-trip correctly without corruption.