DEV Community

Theo Nguyen
Theo Nguyen

Posted on • Originally published at iotools.cloud on

Base32 Encoding: The Unsung Hero of Case-Insensitive Data

You’ve probably heard of Base64. It’s everywhere — embedding images in CSS, encoding JWT tokens, sending binary data over text-based protocols. But what happens when you need to encode data for a system that doesn’t care about uppercase vs lowercase? Or a filename that needs to survive case-insensitive filesystems?

Enter Base32 — Base64’s less glamorous but surprisingly practical sibling. And yes, we’ve got a free Base32 encoder/decoder that handles all the heavy lifting for you. 💪

What Is Base32, Actually?

Base32 encoding converts binary data into a string using only 32 characters: A-Z and 2-7. That’s it. No lowercase letters, no confusing lookalikes like 0/O or 1/I/l. The result is a string that’s completely case-insensitive and avoids the most commonly confused characters.

Here’s what it looks like in action:

Input Base32 Output
Hello JBSWY3DP
Test KRSXG5A=
password123 OBQXG43XN5ZGIZLT

Notice those signs? That’s padding to make the output length a multiple of 8. It’s just how Base32 rolls.

Base32 vs Base64: When to Use Each

The million-dollar question. Here’s the quick breakdown:

Use Base64 when:

  • You need compact encoding (Base64 is about 33% more efficient)
  • The system handles case-sensitivity fine
  • You’re embedding data in URLs, JSON, or HTML

Use Base32 when:

  • Case-insensitivity is required (filesystem paths, DNS, certain protocols)
  • Humans need to read/type the encoded value (TOTP codes, anyone?)
  • You want to avoid ambiguous characters
  • You’re working with systems that only accept alphanumeric input

Where You’ve Already Seen Base32

Base32 is everywhere — you just didn’t realize it:

  • Two-Factor Authentication (TOTP): Those 6-digit codes from Google Authenticator or Authy? The secret key is Base32-encoded. That’s why setup keys look like .
  • Tor .onion addresses: The v3 onion addresses (like ) are Base32-encoded public keys.
  • DNS records: Some DNS-based systems use Base32 because DNS is case-insensitive.
  • File names: When you need encoded data in filenames on Windows (which treats and as the same thing).

Try It Yourself 🚀

Ready to encode some data? Our Base32 Encoder/Decoder is RFC 4648 compliant and works in real-time. No ads in your face, no signup required. Just paste, encode (or decode), and copy.

Whether you’re debugging a 2FA setup, working with case-insensitive protocols, or just curious what your name looks like in Base32 — we’ve got you covered.

➡

Fun fact: “iotools” in Base32 is . Now you know. 🧠

Top comments (0)