CacheHackCacheHack

Base32 Encoder/Decoder

Encode and decode Base32 in various formats: standard (RFC 4648), Base32-Hex, z-base-32, and Crockford's Base32.

Alphabet Reference

Standard:ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
Hex:0123456789ABCDEFGHIJKLMNOPQRSTUV
z-base-32:ybndrfg8ejkmcpqxot1uwisza345h769
Crockford:0123456789ABCDEFGHJKMNPQRSTVWXYZ

Variant Details

  • Standard: RFC 4648 - uses A-Z, 2-7, padding with =
  • Hex: RFC 4648 Extended Hex - uses 0-9, A-V, preserves sort order
  • z-base-32: Human-friendly, avoids similar chars (0/O, 1/l/I)
  • Crockford: Designed for easy reading, I/L→1, O→0 on decode

Puzzle Tips

  • • Base32 uses only uppercase letters and some digits
  • • Standard Base32 never has 0, 1, 8, or 9
  • • Look for = padding at the end (up to 6 chars)
  • • Crockford variant is common in short codes

What is Base32?

Base32 is a binary-to-text encoding scheme that represents binary data using 32 different ASCII characters. It's similar to Base64 but uses fewer characters, making it more suitable for case-insensitive systems.

Base32 Variants

Standard Base32 (RFC 4648)

Uses uppercase A-Z and digits 2-7 (avoiding 0, 1, 8, 9 which could be confused with letters). Padding uses the = character.

Base32-Hex

Uses 0-9 and A-V. Preserves the lexicographic sort order of the original data when encoded.

z-base-32

Human-oriented variant that avoids easily confused characters. Uses lowercase and omits characters like 0/O and 1/l/I.

Crockford's Base32

Designed by Douglas Crockford for easy reading and speaking. Allows ambiguous characters on decode (O→0, I/L→1).

Base32 vs Base64

  • Base32: 32 chars, ~60% larger output, case-insensitive
  • Base64: 64 chars, ~33% larger output, case-sensitive

Common Uses

  • TOTP codes: Two-factor authentication secrets
  • Onion addresses: Tor hidden services (v2)
  • File hashes: Content-addressable storage
  • Geocaching: Puzzle caches with encoded coordinates

Related Encodings

  • Base64: More efficient, case-sensitive encoding.
  • Base16 (Hex): Simple hexadecimal encoding.
  • ASCII85: More efficient for binary data.