Skip to content

Menu

Base32 Encoder

Encode and decode strings using Base32 encoding.

Runs entirely in your browserEncodingFree, no sign-up
Loading tool

01What is Base32 Encoder?

Base32 shows up in places where Base64 causes trouble: authenticator setup keys, case-insensitive file systems, DNS labels and anything a person might read out loud. This tool encodes text into Base32 and decodes it back, following RFC 4648, the IETF document that defines Base16, Base32 and Base64. The standard alphabet is the 26 uppercase letters A to Z plus the digits 2 to 7. The digits 0, 1 and 8 are missing on purpose, so nobody mixes them up with O, I and B. Under the hood the tool turns your text into UTF-8 bytes, writes them out as one long bit string, and slices that into 5-bit groups. Each group picks one character. Five bytes make exactly 40 bits, which is eight characters, so the output is always padded with = signs to a multiple of eight. Here's a quick worked case. The word "Hello" is five bytes, so it becomes JBSWY3DP with no padding at all. The single letter "f" becomes MY======, because one byte only fills two characters and the rest of the block is padding. Those results line up with the test vectors printed in section 10 of the RFC, so you can use the tool to sanity-check your own encoder. A second button switches to the "base32hex" alphabet from section 7 of the RFC. It runs 0 to 9 and then A to V. The point of that variant is ordering: encoded strings sort in the same order as the raw bytes. With it, "foobar" becomes CPNMUOJ1E8====== instead of MZXW6YTBOI======. Decoding is forgiving about formatting. It upper-cases the input, strips spaces and line breaks, and drops trailing = signs, so a lowercase key copied from a setup page still works. Anything outside the selected alphabet, or a length no byte sequence can produce (1, 3 or 6 characters left over after the last full block of eight), gives an "[Invalid Base32 input]" message in the output box. Decoded bytes that form valid UTF-8 show as text. TOTP secrets and other random keys are raw bytes, so for those the tool says the data is binary and lists the bytes in hex instead. Now the limits. The tool always adds padding on encode, and it does not do Crockford Base32 or z-base-32. Your input is handled by JavaScript in the page itself, and the tool makes no network request with it.

Backend developers wiring up TOTP two-factor login who need to check or hand-decode Base32 setup keys against RFC 4648. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Base32 Encoder

  1. Click the Encode/Decode button until it shows the direction you want. Switching clears the input.
  2. Pick Standard or Hex (Extended) for the alphabet. This also clears the input.
  3. Type or paste into the Text to Encode (or Base32 to Decode) box. The result appears as you type.
  4. Read the result under Base32 Encoded or Decoded Text and press Copy to take it.
  5. Press Reset to empty the input and start again.

03Worked examples

Input: Encode "f" (Standard)
Result: MY======
One byte fills two characters. The other six slots in the 8-character block are = padding. Matches the RFC 4648 test vector.
Input: Encode "Hello" (Standard)
Result: JBSWY3DP
Five bytes are exactly 40 bits, so no padding is needed.
Input: Encode "foobar" (Standard)
Result: MZXW6YTBOI======
RFC 4648 test vector for the standard alphabet.
Input: Encode "foobar" (Hex (Extended))
Result: CPNMUOJ1E8======
Same bits, base32hex alphabet (0-9 then A-V).
Input: Encode "é" (Standard)
Result: YOUQ====
é is two UTF-8 bytes (C3 A9) before encoding.
Input: Decode "mzxw6ytboi======" (Standard)
Result: foobar
Lowercase input is upper-cased before decoding.
Input: Decode "JBSWY3DPEHPK3PXP" (Standard)
Result: [Binary data, not UTF-8 text. Hex bytes:] 48 65 6c 6c 6f 21 de ad be ef
A common sample TOTP secret. The last four bytes aren't valid UTF-8, so the decoder shows hex.

04Common use cases

  • Checking that the Base32 setup key your app shows for TOTP two-factor login uses only valid characters before you ship the enrolment screen
  • Turning a short text ID into a case-insensitive string for a DNS label or a file name on a case-insensitive file system
  • Comparing your own Base32 encoder against the RFC 4648 test vectors such as f, foo and foobar
  • Producing base32hex strings when you need encoded keys to sort in the same order as the raw bytes
  • Decoding a lowercase or space-separated Base32 string from a support ticket to see the text inside
  • Showing a junior developer why 5 bytes map cleanly to 8 characters while 1 byte needs six = signs

05Tips

  • Base32 output is 60 percent larger than the input (8 characters per 5 bytes), so pick it for case-insensitivity or hand typing, not for size.
  • Many authenticator apps expect an unpadded key. Strip the trailing = signs from the output before you put it in an otpauth:// URI.
  • Decoding a TOTP secret shows hex bytes, not text. That's expected, because the secret is random bytes rather than UTF-8.
  • Standard and Hex (Extended) are not interchangeable. If a known-good string fails to decode, check which alphabet button is active.
  • Crockford Base32 drops I, L, O and U and uses a different order, so its strings won't decode correctly here.

06Related concepts

RFC 4648, TOTP, Base64, Crockford Base32.

Frequently Asked Questions

What is Base32 Encoder?

Base32 Encoder is a free, browser-based developer tool on AIDToolStack. Encode and decode strings using Base32 encoding. It requires no installation or sign-up and works entirely in your browser.

Is Base32 Encoder free to use?

Yes. No sign-up, no fees and no usage cap.

Does Base32 Encoder store my data?

No. It runs in your browser; nothing is uploaded.

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe