Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Base32 Encoder & Decoder

Encode text to Base32 or decode Base32 back to text using the RFC 4648 standard alphabet (A-Z, 2-7)

Your data never leaves your browser
Input0 chars
Output0 chars
Ready·Mode: Encode

Paste plain text to get Base32 (RFC 4648), or paste Base32 to decode it back — conversion fires as you type, both directions. Swap input and output in one click to verify round-trips on TOTP secrets, API tokens, or DNS record values. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Text or Base32
➔
5-Bit Group Mapping
➔
Encoded / Decoded Result

Base32 splits your input into 5-bit chunks and maps each chunk to one of 32 characters (A–Z and 2–7). Because 5 doesn't divide evenly into 8-bit bytes, padding characters (=) get added at the end to fill the gap. Decoding reverses the process — strips the padding, converts each character back to its 5-bit value, then reassembles the original bytes.

Examples

Encoding a Simple Greeting

Quick test to see how Base32 transforms short ASCII text.

INPUT
Hello
OUTPUT
JBSWY3DP

TOTP Secret Key Round-Trip

Two-factor authentication apps store secrets as Base32. Here's encoding a sample secret and verifying the decode matches.

INPUT (Encode)
MySecretKey123
OUTPUT
JV2WIZLMMFRGKZDFGE4TAMI=

Swap the input and output using the swap button. If the decoded result matches the original, the key is valid. Mismatched padding or wrong characters will produce garbled text — a quick way to spot typos.

Encoding a URL for a Case-Insensitive System

Some DNS or file systems are case-insensitive. Base32 only uses uppercase A–Z and digits 2–7, so it's safe there — unlike Base64 which mixes cases.

INPUT
https://example.com
OUTPUT
NB2HI4DTHIXS653XO4XGM2LMMQ======

Who Uses This

👨‍💻 Developers

Debugging TOTP secrets, encoding binary blobs for APIs that reject Base64 special characters.

🔒 Security Engineers

Verifying MFA seed values and decoding tokens pulled from authentication logs.

🎓 Students

Learning how different encoding schemes work by comparing Base32, Base64, and hex side by side.

⚙️ Sysadmins

Encoding data for DNS TXT records and other systems that choke on lowercase or special characters.

Common Mistakes

Confusing Base32 with Base64

They are not interchangeable. Base64 uses 64 characters including +, /, and mixed case. Base32 sticks to uppercase letters and digits 2–7. Pasting a Base64 string into a Base32 decoder gives garbage or an error.

Stripping the padding before decoding

Those trailing = signs look unnecessary, but they tell the decoder how many bits were in the last group. Remove them and the last few characters of your original data can come back wrong or disappear entirely.

Using characters outside the Base32 alphabet

Base32 only uses A–Z and 2–7. Digits 0, 1, 8, and 9 aren't part of it. If you type HELLO10 expecting valid Base32, the 1 and 0 will cause a decode failure. Double-check for stray characters when pasting encoded strings.

Technical Details

Frequently Asked Questions

What is Base32 encoding used for?

Base32 shows up most often in two-factor authentication. Apps like Google Authenticator store TOTP secrets as Base32 strings because the alphabet is case-insensitive and avoids confusing characters like 0/O or 1/l. It's also used in some DNS record values and file naming schemes where mixed case would cause problems.

What is the difference between Base32 and Base64?

Base64 is more compact — it encodes 6 bits per character using 64 symbols (A–Z, a–z, 0–9, +, /). Base32 encodes 5 bits per character using only 32 symbols (A–Z, 2–7), which makes the output about 20% longer. The tradeoff is that Base32 works in case-insensitive contexts where Base64 would break.

Why does Base32 output end with equal signs?

The = signs are padding. Base32 works on 40-bit blocks (eight 5-bit characters), but your input might not divide evenly into 40 bits. The padding fills the remaining space so decoders know exactly how many original bytes to reconstruct. You can have up to six padding characters depending on input length.

Is Base32 encoding the same as encryption?

No. Not even close. Encoding is a reversible format change — anyone with a Base32 decoder can read your original data in seconds. There's no key, no password, no secret. If you need to protect sensitive information, use actual encryption (AES, for example) and then optionally Base32-encode the encrypted output.

Can I encode files or binary data with this tool?

This tool handles text input. If you need to encode raw binary data, you'd first convert it to a text representation (like a hex string) and then encode that. For direct binary-to-Base32, a command-line tool or programming library is a better fit.

Share: