Glossary

What Is Base32? (And Why It's Different from Base64)

Base32 encodes binary data using 32 ASCII characters (A-Z, 2-7). Used for QR codes, TOTP secrets, and case-insensitive systems. Plain explanation with examples.

Short answer

Base32 encodes arbitrary binary data using just 32 ASCII characters: A–Z and 2–7. It's bigger than Base64 (uses 32 symbols instead of 64), but it has one important advantage — it's case-insensitive and avoids ambiguous characters (0/O, 1/I/L) — making it ideal for systems where users type the value, like TOTP authentication secrets and QR codes.

The Base32 alphabet (RFC 4648)

IndexCharIndexChar
0A16Q
1B17R
2C18S
3D19T
4E20U
5F21V
6G22W
7H23X
8I24Y
9J25Z
10K262
11L273
12M284
13N295
14O306
15P317

Base32 vs Base64 — practical differences

Base32Base64
Alphabet size32 chars64 chars
Characters usedA-Z, 2-7A-Z, a-z, 0-9, +, /
Output size~60% larger than input~33% larger than input
Case-sensitive?No (a=A)Yes (a≠A)
Ambiguous chars?No (avoids 0,1,8,9 entirely)Yes (0/O, 1/l/I)
URL-safe?YesStandard variant has /+ — needs Base64URL variant
Best forHuman-typed secrets, QR codesBinary in text contexts (HTTP headers, JSON)

Where you'll encounter Base32

  • TOTP / 2FA secrets — Google Authenticator, Authy, 1Password all use Base32 for the shared secret seed because users sometimes type it manually
  • Onion services — Tor v3 onion addresses are Base32-encoded
  • QR codes for short content — case-insensitive Base32 simplifies scanner correction
  • Voice transmission — radio operators, customer-service phone codes — Base32 over a phone line works (no homonyms to confuse)
  • DNS labels — DNS is case-insensitive; Base32 fits the constraint

Padding

Base32 output length is always a multiple of 8 characters. If the input doesn't divide evenly, the result is padded with = characters. Some implementations omit the padding (RFC 4648 allows both with/without).

Variants

  • RFC 4648 Base32 — the standard (alphabet shown above)
  • Crockford Base32 — different alphabet (excludes I, L, O, U); more human-friendly when read aloud
  • z-base-32 — used in cryptography; reorders alphabet so common values get more readable letters
  • Base32hex — extension that preserves sort order (rare, niche)

Common confusion

If a user reports a TOTP secret "doesn't work" but everything looks fine, they probably typed an O instead of 0 or I instead of 1. Base32 specifically excludes both ambiguous pairs to prevent this — but only if the system rejects those characters during entry.

Related tools

For Base64 (the more common encoding for binary in text contexts): Base64 encoder/decoder. Generate QR codes that use Base32-style content: QR code generator. Hash secrets before encoding: hash generator.

Featured Tools

Try these free tools directly in your browser — no sign-up required.

what is base32 base32 vs base64 base32 encoding totp secret base32 alphabet

Explore 300+ Free Tools

Utilko has tools for developers, writers, designers, students, and everyday users — all free, all browser-based.