Base32 Encode and Decode

Base32 writes data with only capital letters and the digits 2 to 7, so it survives being read aloud, typed by hand or used where case is ignored.

How it works

Text is turned into UTF-8 bytes, and the bytes are cut into groups of 5 bits. Each group, a number from 0 to 31, is written as one character from the RFC 4648 alphabet: A to Z for 0 to 25 and 2 to 7 for 26 to 31.

Every 5 bytes become 8 characters. When the input does not divide evenly, = signs pad the result out to a multiple of 8.

Decoding accepts lower case, spaces, line breaks and missing padding, and names any character outside the alphabet. It all runs on this page; nothing is sent anywhere.

How to use it

  1. 1 Pick Encode or Decode.
  2. 2 Type or paste into the first box. The result appears as you type.
  3. 3 Copy the result or download it as a .txt file.
  4. 4 Use Swap to move the result back into the first box and check that it round-trips.

Good to know

  • Base32 is not encryption. Anyone can decode it, so it does not protect a secret.
  • The setup keys for authenticator apps (TOTP) are Base32. This tool decodes them to text, but most are random bytes rather than text, so expect a "not UTF-8 text" message.
  • Base32 output is 60% longer than the input; Base64 is only 33% longer. Base32 trades size for being easy to read and type.
  • There is no 0, 1, 8 or 9 in the alphabet. If someone reads you a key with a zero, they almost certainly mean the letter O.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Base32: a slower, longer Base64 that people can actually type

Base32 and Base64 solve the same problem in different ways. Both take bytes, which can hold any value, and write them using only a small set of characters that every system can carry. Base64 uses 64 characters, upper and lower case letters, digits, + and /, so each character carries 6 bits. Base32 uses 32 characters, so each carries only 5 bits, and the result is longer. What Base32 gets in return is an alphabet that a person can read, type and say aloud without mistakes, and that survives systems that do not keep upper and lower case apart.

The alphabet, defined in RFC 4648, is A to Z for the values 0 to 25 and then the digits 2 to 7 for 26 to 31. The digits 0, 1, 8 and 9 are left out on purpose, because they look like O, I, B and g in many fonts. Lower case is not used at all, so "mzxw6" and "MZXW6" mean the same thing, which is why the decoder here accepts either. That is the reason authenticator apps show their setup keys in Base32: you may have to type a key from a screen into a phone, and an alphabet without look-alikes makes that much safer.

Here is a worked example. The word "café" is five bytes in UTF-8: 63 61 66 c3 a9. Five bytes are exactly 40 bits, which split cleanly into eight groups of five: 01100 01101 10000 10110 01101 10000 11101 01001. Those are the numbers 12, 13, 16, 22, 13, 16, 29 and 9, which in the Base32 alphabet are M, N, Q, W, N, Q, 5 and J. So "café" is MNQWNQ5J, and you can check it in the box above. Because 5 bytes fill one block of 8 characters exactly, there is no padding. Two bytes, such as "fo", fill only 16 bits, which is four characters (MZXQ) with four = signs to finish the block: MZXQ====.

The cost is size. Every 5 bytes become 8 characters, so Base32 is 60% bigger than the data it encodes, against 33% for Base64. For a 16 byte key that hardly matters. For a file it does, which is why Base32 is used where people meet the data, such as one-time password secrets, some file names and identifiers, and DNS records, and Base64 is used where only machines do. Like Base64, Base32 is not encryption. It hides nothing; anyone with this page or one line of Python can read it.

One limit to know about: many Base32 strings in the wild are not text. A TOTP secret, for example, is a run of random bytes, and decoding it gives bytes that do not form valid UTF-8. This tool decodes to text, so in that case it says the result is not UTF-8 text rather than showing garbage. Also note that "Base32" is used loosely. Crockford’s Base32, z-base-32 and the extended hex alphabet (base32hex) all use different characters. This page uses the standard RFC 4648 alphabet, which is what most libraries mean by Base32.

Frequently asked questions

When should I use Base32 instead of Base64?

When people have to read, type or say the result, or when it goes somewhere that ignores case, such as a domain name or a file system on Windows. Base32 has one case and no look-alike characters. Base64 is shorter, so it is the better choice when only machines read it.

Why are 0, 1, 8 and 9 missing?

Because they are easy to confuse with the letters O, I, B and g. Leaving them out means a key copied by hand off a screen or a sheet of paper is less likely to be copied wrong.

What are the = signs at the end?

Padding. Base32 works in blocks of 8 characters, and = fills the rest of the last block when the data runs out. Many systems leave it off; the decoder here accepts Base32 with or without it.

Is this the same Base32 as Crockford or z-base-32?

No. This is the standard RFC 4648 alphabet, which is what authenticator apps, Python’s base64.b32encode and most libraries use. Crockford’s Base32 and z-base-32 use different alphabets and will not decode correctly here.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.