Runs in your browser. Your files and text never leave your device - nothing is uploaded.
Free Base32 Encoder and Decoder
The Tools Kit’s free Base32 Encoder converts text to Base32 and decodes Base32 back to text. It uses the standard RFC 4648 alphabet of uppercase letters A to Z and digits 2 to 7, and pads the output with equals signs to a multiple of eight characters, so the result matches what other Base32 libraries and command-line tools produce.
Everything runs in your browser. Text is turned into UTF-8 bytes before encoding, so accented letters and emoji survive the round trip, and nothing you type is uploaded. If you need the more compact, case-sensitive format instead, the Base64 encoder works the same way.
How to Encode and Decode Base32
- 1
Enter your text
Type or paste the text you want to convert into the Text box. Any Unicode text works, including accented letters and emoji, because it is converted to UTF-8 bytes first.
- 2
Click Encode
Press Encode to fill the Base32 box with the result, written in the RFC 4648 alphabet (A-Z and 2-7) and padded with equals signs to a multiple of eight characters.
- 3
Copy the Base32 string
Click Copy Base32 to put the encoded string on your clipboard, ready to paste into a config file, URL or script.
- 4
Decode Base32 back to text
To go the other way, paste a Base32 string into the Base32 box and press Decode. Lowercase input and missing padding are accepted, and the decoded text appears in the Text box.
If decoding fails, a red message names the exact character that is not valid Base32, such as a space, a hyphen or the digit 1, so you know what to remove.
How Base32 Encoding Works
A computer stores text as bytes of 8 bits. Base32 regroups those bits into chunks of 5, and each 5-bit chunk (a number from 0 to 31) is written as one character: 0 to 25 become the letters A to Z, and 26 to 31 become the digits 2 to 7. Because 5 bytes hold 40 bits, they fill exactly 8 Base32 characters. If you want to see the raw bits of a byte for yourself, the binary converter shows any number in binary, decimal and hex.
Here is the word Hi worked through by hand. Its two bytes are 72 and 105, or 01001000 01101001 in binary. Split into 5-bit groups that is 01001 00001 10100 1; the last group is filled with zeros to 10000. Those values are 9, 1, 20 and 16, which map to J, B, U and Q. Four characters fall short of a block of eight, so four equals signs are added and the result is JBUQ====.
Base32 Padding and Output Length
Every 5 bytes of input produce 8 characters, so Base32 output is 60 percent larger than the input. When the input length is not a multiple of 5 bytes, the final block is padded with equals signs. The RFC 4648 test vectors, all reproduced exactly by this tool, show the pattern:
| Input | Bytes | Base32 output | Padding |
|---|---|---|---|
| f | 1 | MY====== | 6 |
| fo | 2 | MZXQ==== | 4 |
| foo | 3 | MZXW6=== | 3 |
| foob | 4 | MZXW6YQ= | 1 |
| fooba | 5 | MZXW6YTB | 0 |
| foobar | 6 | MZXW6YTBOI====== | 6 |
Bytes, not characters, decide the length. The word café has four characters but five UTF-8 bytes, because é takes two, so it encodes to the full block MNQWNQ5J. When decoding, the tool strips trailing equals signs before reading, so an unpadded string decodes to the same text.
Base32 vs Base64: Which Should You Use?
Base64 is more compact, adding about 33 percent instead of 60, which is why it is the usual choice for email attachments, data URIs and API payloads; you can reverse it with the Base64 decoder. Its weakness is that it mixes upper and lowercase letters and uses + and /, which break in case-insensitive systems and have to be escaped in links, as the URL encoder shows.
Base32 trades size for robustness. Its output is case-insensitive, contains no punctuation apart from padding, and avoids the look-alike digits 0, 1 and 8, so it is easier to read aloud, type by hand or use in file names and DNS labels. That is why two-factor authentication apps share setup keys in Base32. Keep in mind that neither format is encryption: both can be reversed by anyone, so use a keyed hash such as the HMAC generator when you need to verify data.
Base32 and 2FA Secret Keys
The setup key shown beneath a two-factor QR code, such as JBSWY3DPEHPK3PXP, is Base32. It encodes random bytes rather than words, so decoding it here produces partly unreadable text with replacement characters; that is expected, not an error. To check that a secret works, paste it into the TOTP generator, which turns it into the same six-digit codes an authenticator app shows. Setup keys are often displayed in groups of four with spaces, which this decoder rejects, so remove the spaces first.
Common uses
- Encoding a value for a case-insensitive system such as a DNS label or file name
- Creating an identifier that is easy to read over the phone or type by hand
- Checking what a Base32 string from a config file or log contains
- Comparing your own Base32 implementation against the RFC 4648 test vectors
- Learning how binary-to-text encodings group bits into characters
Need a random secret to encode in the first place? The password generator creates one with a cryptographically secure random source. For more encoding, hashing and token utilities, browse all security tools.
Base32 terms explained
| Term | What it means here |
|---|---|
| Base32 | A binary-to-text encoding that writes data with 32 symbols, 5 bits per character |
| RFC 4648 | The IETF standard that defines Base16, Base32 and Base64; this tool uses its standard Base32 alphabet |
| Alphabet | The 32 output symbols: the letters A to Z (values 0-25) and the digits 2 to 7 (values 26-31) |
| Padding | Trailing equals signs that round the output up to a multiple of eight characters |
| Quantum | A 5-byte (40-bit) block of input that maps exactly onto 8 Base32 characters |
| UTF-8 | The byte encoding used for text before it is converted, so one character may become several bytes |
Frequently Asked Questions
Base32 is a way of writing any data using only 32 safe characters: the uppercase letters A to Z and the digits 2 to 7. Each character carries 5 bits, so every 5 bytes of input become 8 characters of output. The standard version is defined in RFC 4648, which is the alphabet this encoder uses.
Type or paste your text into the Text box and click Encode. The Base32 version appears in the box below, padded with equals signs to a multiple of eight characters, and the Copy Base32 button copies it. For example, Hello encodes to JBSWY3DP.
Paste the Base32 string into the Base32 box and click Decode. Lowercase letters are converted to uppercase and trailing equals signs are optional, so jbswy3dp decodes to Hello. The result is read as UTF-8 text and shown in the Text box.
Base32 works in blocks of 5 bytes, which fill exactly 8 characters. When the input is not a multiple of 5 bytes, the last block is filled with zero bits and the output is padded with = signs to reach 8 characters. One byte gives 2 characters plus 6 equals signs; four bytes give 7 characters plus 1.
The decoder found a character outside the Base32 alphabet, and the message names it. Common causes are the digits 0, 1, 8 and 9, which Base32 never uses, spaces or line breaks inside the string, punctuation such as hyphens, and an equals sign in the middle of the input. Remove the character and decode again.
No. Base64 uses 64 symbols, including lowercase letters, + and /, pads with =, and stores 6 bits per character, so output is about 33 percent larger than the input. Base32 stores 5 bits per character and output is 60 percent larger, but it is case-insensitive and avoids symbols that break in file names, URLs and DNS labels.
Twenty-six letters plus six digits make exactly 32 symbols. RFC 4648 picks the digits 2 to 7 so that 0, 1 and 8 cannot be confused with the letters O, I and B when someone reads or types the value by hand.
You can, but the result will usually look like garbled text. A TOTP secret is random binary data, not text, and this tool shows decoded bytes as UTF-8 text, so bytes that are not valid text appear as replacement characters. To turn a secret into a working six-digit code, use the TOTP generator instead.
Not directly. Spaces inside the string are reported as an invalid Base32 character, so remove them before clicking Decode. Leading and trailing spaces are trimmed automatically.
No. Base32 is an encoding, not encryption. Anyone can reverse it without a key, so never treat a Base32 string as a way to protect a password or other secret.
No. Encoding and decoding run as JavaScript in your browser. The text you enter is never uploaded, stored or logged, which matters when the value is a key or token.
Reviewed by Raja Jahangir · Last reviewed: October 7, 2026
How do you encode text to Base32?
To encode text to Base32, paste the text and click Encode; the output uses the RFC 4648 alphabet of A-Z and 2-7, padded with equals signs to a multiple of eight characters, so "Hi" becomes JBUQ====. Paste Base32 into the lower box and click Decode to reverse it. Encoding and decoding both run in the browser.
Why does Base32 output end with equals signs?
Base32 turns every 5 bytes of input into 8 output characters. When the input length is not a multiple of 5, the final group is padded with equals signs so the output stays a multiple of eight characters. Two bytes, for instance, produce four characters plus four padding signs. Decoders strip the padding before reading.
