Skip to main content

Base32 Encoder/Decoder

Encode text to Base32 or decode Base32 strings back to plain text (RFC 4648, UTF-8 aware). Handles padding and validates Base32 characters automatically.

Input

Output

Result
Was this helpful?

Guides

Base32 is a binary-to-text encoding scheme defined in RFC 4648 that represents arbitrary bytes using only the 32 characters A–Z and 2–7, padded with = to a multiple of 8 output characters. Unlike Base64, Base32 output is case-insensitive and avoids visually ambiguous characters (no 0/O or 1/I confusion), which is why it shows up in places meant to be typed or read by humans rather than only copy-pasted by machines.

What it's used for

  • TOTP / 2FA secrets — the shared secret behind Google Authenticator, Authy, and similar apps (as specified in RFC 6238) is almost always encoded as Base32 so it can be typed manually or embedded in a QR code URI.
  • DNS-safe encoding — DNS labels are case-insensitive and restrict allowed characters, so systems that need to stuff binary data (hashes, identifiers) into a hostname often use Base32 instead of Base64.
  • Filesystem-safe identifiers — Base32's restricted alphabet avoids characters that are special on case-insensitive filesystems (like classic Windows/macOS defaults), unlike Base64's +, /, and mixed case.
  • Human-readable tokens — codes that a person might need to read aloud or transcribe (recovery keys, license keys, hardware serials) commonly use Base32 for the same ambiguity-avoidance reasons.

How to use this tool

  1. Paste text into the input box.
  2. Choose Encode to convert plain text to Base32, or Decode to convert a Base32 string back to text.
  3. The result appears in the output box automatically — no button click needed. Use the copy or download icon to grab it.

Encoding accepts any UTF-8 text (the text is UTF-8 encoded before being Base32-encoded, so emoji and non-Latin scripts round-trip correctly). Decoding expects a valid Base32 string with correct = padding; if the decoded bytes aren't valid UTF-8 text, or the input contains characters outside A–Z, 2–7, and =, the tool reports a clear error instead of producing garbage output.

FAQ

Why is my Base32 output longer than the original text? Base32 encodes every 5 bits of input as one output character, so it always expands data — roughly 8 output characters for every 5 input bytes (a ~60% size increase), plus padding. This is normal and matches the RFC 4648 specification exactly.

Is Base32 the same as Base64? No. Both are binary-to-text encodings, but Base64 uses a 64-character alphabet (more compact output) while Base32 uses a 32-character alphabet (larger output, but case-insensitive and free of ambiguous-looking characters). Use Base64 for compactness; use Base32 when the result needs to be typed, read aloud, or embedded somewhere case-insensitive, like a TOTP secret.

Is Base32 encryption? No — Base32 is not encryption or compression. It's purely a representation format; anyone can decode it back to the original data instantly. Don't use it to protect sensitive information.

Why does decoding sometimes fail? Base32 requires the input length (including = padding) to be a multiple of 8 characters, with a specific number of padding characters depending on how many data characters precede them. If the padding is missing, wrong, or the string contains characters outside the Base32 alphabet, decoding fails with a descriptive error rather than silently returning incorrect bytes.

Privacy

All encoding and decoding happens entirely in your browser — your text never leaves your device or gets sent to a server.

base32encodedecodeencodingrfc4648developer

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.