Base32 Encode and Decode

This tool converts text to and from Base32, a binary-to-text encoding defined in RFC 4648

Updated
Loading toolโ€ฆ

This tool converts text to and from Base32, a binary-to-text encoding defined in RFC 4648

How to use Base32 Encode and Decode

  1. Choose Encode to convert text to Base32, or Decode to convert Base32 back to text.
  2. Pick the alphabet (standard or base32hex) and, when encoding, whether to add padding.
  3. Type or paste your input and copy the result that appears below.
Try next โ†’TOML to JSON ConverterThis tool converts TOML (Tom's Obvious Minimal Language) configuration into JSON

About Base32 Encode and Decode

This tool converts text to and from Base32, a binary-to-text encoding defined in RFC 4648. Base32 uses a 32-character alphabet (Aโ€“Z and 2โ€“7 by default) so the output is case-insensitive and avoids characters that are easy to confuse, which makes it common in TOTP two-factor secrets, DNS records, and file or resource identifiers. Type or paste in the box and the result updates instantly.

Text you enter is first encoded as UTF-8 bytes, so accented letters, non-Latin scripts, and emoji round-trip correctly. You can choose between the standard RFC 4648 alphabet and the base32hex (extended hex) alphabet, and turn the "=" padding on or off. When decoding, spaces, line breaks, and padding are ignored and lowercase input is accepted, so pasting a wrapped or messy string still works.

Everything runs locally in your browser using the built-in encoder and decoder โ€” nothing is uploaded and there are no network calls, so it is safe to paste secrets like 2FA keys. Note that Base32 is an encoding, not encryption: anyone can decode it, so it does not protect or hide data on its own.

Frequently asked questions

What is Base32 used for?
Base32 is a way to represent binary data using 32 readable, case-insensitive characters. It is widely used for TOTP/two-factor authentication secrets, DNS and identifier fields, and anywhere a compact, human-friendly string is needed that avoids ambiguous characters like 0/O or 1/l.
How is Base32 different from Base64?
Both turn bytes into text, but Base32 uses only 32 characters (Aโ€“Z, 2โ€“7) and is case-insensitive, so it is safer for URLs, filenames, and things people type by hand. The trade-off is that Base32 output is about 20% longer than the equivalent Base64.
What is the difference between standard and base32hex?
Standard (RFC 4648) uses the alphabet Aโ€“Z and 2โ€“7. Base32hex (extended hex) uses 0โ€“9 and Aโ€“V instead, which preserves sort order of the original bytes. Pick the one your target system expects โ€” the encoded results are not interchangeable.
Do I need the '=' padding?
Padding pads the output to a multiple of 8 characters and is part of the strict RFC 4648 format. Many systems, including most 2FA apps, accept unpadded Base32, so you can toggle it off. When decoding, padding is optional here and is ignored either way.
Is my data sent anywhere?
No. All encoding and decoding happens entirely in your browser with no uploads and no network requests, so it is safe to paste sensitive values such as authenticator secrets.
Why does my decoded output look garbled?
Base32 only decodes cleanly if the input is valid Base32 of actual text. If the original data was raw bytes (like a random 2FA secret) rather than readable text, the decoded characters can look like nonsense โ€” that is expected.