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.

Detailed Guide

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 st...

Looking for a more detailed deep-dive and advanced tips?

Read Full Article on our Blog