Base32 Encoder / Decoder

Encode UTF-8 text to Base32 (RFC 4648) or decode Base32 back to plain text. Base32 uses only uppercase letters and digits 2–7, making it safe for case-insensitive systems.

Input

Output

✓ Copied!
Output will appear here…

FAQ

What is Base32 used for?

Base32 is used in TOTP (two-factor authentication secret keys), IPFS content identifiers (CIDv1), Onion addresses in Tor, and anywhere case-insensitive encoded data is needed.

Is Base32 the same as Base64?

No. Both are binary-to-text encodings, but Base32 uses 32 characters (A-Z, 2-7) while Base64 uses 64. Base32 is 20% less efficient but handles case-insensitive environments better.

Does this support non-ASCII characters?

Yes. Input text is first converted to UTF-8 bytes, then Base32-encoded. Decoding reconstructs the original UTF-8 string.

Frequently Asked Questions

What is Base32?

Base32 is a binary-to-text encoding scheme using 32 ASCII characters (A–Z and 2–7), defined in RFC 4648. It is more human-readable than Base64 and safe in case-insensitive file systems.

When is Base32 used?

Base32 is used in TOTP/HOTP codes (Google Authenticator), Crockford encoding, and case-insensitive file systems. Its alphabet avoids visually ambiguous characters like 0, 1, O, and I.

Is Base32 the same as Base64?

No. Base32 uses a 32-character alphabet producing ~20% more overhead than Base64, but it is safe in case-insensitive contexts and avoids special characters like + and /.

How Base32 Encoding Works

Base32 (RFC 4648) encodes binary data into a text string using only 32 ASCII characters: the uppercase letters A–Zand the digits 2–7. The digits 0, 1, 8, and 9 are intentionally excluded to avoid confusion with the letters O, I, B, and the similar-looking digit pairs.

The algorithm groups input bytes into 5-bit blocks (since 2⁵ = 32) and maps each block to one of the 32 characters. Every 5 input bytes (40 bits) produce exactly 8 Base32 characters. If the input length is not a multiple of 5, padding characters (=) are appended to make the output length a multiple of 8.

Base32 vs Base64

PropertyBase32Base64
Alphabet size32 characters (A–Z, 2–7)64 characters (A–Z, a–z, 0–9, +, /)
Output overhead~60% larger than input~33% larger than input
Case sensitiveNo — safe in file systemsYes — A ≠ a
URL safeYes — no special charactersNo (use Base64url variant)
Human readableMore readable (no 0/O confusion)Less readable
Common useTOTP secrets, Crockford IDsJWT, images, MIME attachments

Base32 in Two-Factor Authentication (TOTP)

The most common real-world use of Base32 is storing TOTP secrets (RFC 6238) — the seed used by apps like Google Authenticator and Authy to generate 6-digit time-based one-time passwords.

When you scan a QR code to set up 2FA, the secret key in the QR code is a Base32 string likeJBSWY3DPEHPK3PXP. Base32 was chosen for TOTP because:

  • It is case-insensitive — users can type the secret manually without worrying about case.
  • It excludes visually ambiguous characters (0/O, 1/I) to reduce transcription errors.
  • It does not contain +, /, or other URL-special characters.