ToolsHubs
ToolsHubs
Privacy First

Base32 Encoder / Decoder

Encode text to Base32 or decode Base32 strings back to plain text. Uses RFC 4648 standard. Perfect for users needing a base 32 decoder.

How to use Base32 Encoder / Decoder

  1. 1

    Select Encode or Decode mode.

  2. 2

    Paste your text or Base32 string.

  3. 3

    Copy the converted output.

Frequently Asked Questions

What is Base32 used for?

It is commonly used for two-factor authentication (2FA) shared secrets, as it avoids ambiguous characters like 1, l, 0, and O.

What Is Base32?

Base32 is a way to represent arbitrary binary data using only 32 printable characters: the uppercase letters A–Z and the digits 2–7.

You're probably more familiar with Base64, which uses 64 characters (A–Z, a–z, 0–9, +, /). So why would you want a smaller alphabet with fewer characters?

Because Base32 makes fewer assumptions about the environment it's used in.

Base64's characters include +, /, and =, which have special meanings in URLs, file systems, and programming languages. You need to use URL-safe variants of Base64 fairly often. Base32's alphabet — only uppercase letters and digits — has no special meaning in virtually any context. It's case-insensitive too, which means JBSWY3DP and jbswy3dp decode to the same thing.


How Base32 Encoding Works

Every Base32 character represents exactly 5 bits of binary data (because 2⁵ = 32). To encode, you:

  1. Take the input bytes
  2. Convert them to binary
  3. Group bits into 5-bit chunks
  4. Map each chunk to the corresponding Base32 character

Since bytes are 8 bits, encoding 5 bytes (40 bits) requires exactly 8 Base32 characters (40 ÷ 5 = 8). When the input isn't a multiple of 5 bytes, padding characters (=) are added to reach a multiple of 8 output characters.

Example: Encoding the word Man:

M           a           n
77          97          110        (ASCII decimal)
01001101    01100001    01101110   (binary)

Combined: 010011010110000101101110
Grouped:  01001 10101 10000 10110 1110
As Base32: J     V     Q     W     4
Result: JVQW4 (with padding: JVQW4===)

Base32 vs Base64: When to Choose Which

FactorBase32Base64
Characters usedA-Z, 2-7A-Z, a-z, 0-9, +, /
Case sensitive?NoYes
URL safe by default?YesNo (needs variant)
Efficiency80% of raw size75% overhead vs raw
Common usesOTP, checksums, DNSEmail attachments, JSON/HTTP

Choose Base32 when:

  • The encoded string will appear in a URL without escaping
  • You need case-insensitive comparison
  • The string will be typed by hand (fewer confusable characters)
  • You're working with TOTP/HOTP secret keys

Choose Base64 when:

  • You're embedding in JSON, XML, or HTTP
  • File size matters and you want the most compact encoding
  • You're transmitting binary data in email (MIME)

The Most Important Use Case: TOTP Secret Keys

If you've ever set up two-factor authentication (2FA) and scanned a QR code, or seen a string of uppercase letters and numbers, you've encountered Base32.

TOTP (Time-based One-Time Password) — the standard behind Google Authenticator, Authy, and most 2FA apps — stores shared secrets in Base32 format. When a site gives you a backup code like:

JBSWY3DPEBLW64TMMQ======

...that's a Base32-encoded 20-byte secret key. Your authenticator app decodes it back to bytes, then uses the current time and an HMAC-SHA1 algorithm to generate your 6-digit code.

Our converter lets you:

  • Decode these secret keys to see the raw bytes
  • Encode test secrets for building your own 2FA implementation
  • Verify Base32 strings during debugging

Other Real-World Uses

File integrity checksums in DNS: DNSSEC zone keys and DS records are often Base32-encoded for inclusion in DNS TXT records, since DNS is case-insensitive.

Crockford Base32: A variant developed by Douglas Crockford avoids ambiguous characters like O vs 0 and I vs 1 and L. Used in some ID generation systems for human readability.

Onion addresses: Tor's .onion addresses use Base32 to encode 10 bytes of the host's public key into a 16-character string (3g2upl4pq6kufc4m.onion).


How to Use the Tool

Encode (Text → Base32):

  1. Paste or type your plain text in the input box.
  2. The tool converts it to bytes using UTF-8, then Base32-encodes it.
  3. Copy the result — it's safe to use in URLs, DNS records, or config files.

Decode (Base32 → Text):

  1. Paste a Base32 string (letters A-Z and digits 2-7, optional = padding).
  2. The tool decodes it and shows the original text or raw bytes.
  3. Invalid characters are flagged so you can spot typos quickly.

Related Search Queries

To help users find exactly what they are looking for, this tool is also optimized for searches like: base 32 decoder, base32 encode.