Base32 encoder — text to RFC 4648 Base32 or Base32hex

Type text and get its RFC 4648 Base32 form, a case-insensitive alphabet of A–Z and 2–7 that people can read aloud and type without mixing up characters.

Live demo · real result from this tool
Alphabet

Base32

KRXW63DTKJUWM5BAMVXGG33EMVZSA5DFPB2CAYLTEBKVIRRNHAQGM2LSON2CYIDTN4QGGYLGYOUSYIHAUSUOBJFO4CSLRYFFRXQKJJHAUWDSAYLOMQQPBH4RRMQHE33VNZSC25DSNFYCAZLYMFRXI3DZFY======
Input
96 B
Output length
160 characters

Processed on your device — nothing is uploaded.

How to use the Base32 encoder

  1. Type or paste your text into Text to encode.
  2. Choose the Alphabet: Base32 (A–Z, 2–7) for most uses, or Base32hex (0–9, A–V) if a system asks for the “extended hex” alphabet.
  3. Leave Pad with = ticked for standard output, or untick it to drop the trailing = signs.
  4. Copy the Base32 result. Below it you see the input size in bytes and the output length in characters.

What it does and when to use it

Base32 writes any bytes using only 32 safe characters. Because the alphabet has no lowercase letters and no look-alike digits, it survives being read over the phone, printed, or typed in by hand. It also works where case is ignored, such as DNS names.

The most common place you meet it is two-factor authentication. Authenticator apps usually share their secret key as a Base32 string, and the TOTP secret generator produces keys in this form.

Base32 is an encoding, not encryption. To turn Base32 back into text, use the Base32 decoder. If size matters more than readability, Base64 is shorter, and the Base45 encoder is designed for QR codes.

How it works

The tool follows the Base32 and Base32hex alphabets in RFC 4648, sections 6 and 7.

  1. Your text becomes UTF-8 bytes. “Hello” is 5 bytes; “é” is 2 bytes.
  2. The bytes are read as one long stream of bits and cut into 5-bit groups. Each group is a number from 0 to 31.
  3. Each number picks one character from the chosen alphabet.
  4. Every 5 bytes (40 bits) give exactly 8 characters. If the last group is short, it is filled with zero bits, and with padding on, = signs are added until the length is a multiple of 8.

Everything happens in your browser; the text is not uploaded.

Worked examples

Hello                  →  JBSWY3DP
foobar  (Base32hex)    →  CPNMUOJ1E8======
Hi!     (no padding)   →  JBUSC
12345678901234567890   →  GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ

“Hello” is exactly 5 bytes, so it fills 8 characters with no padding. “foobar” in Base32hex is one of the RFC 4648 test vectors: 6 bytes need 10 characters, padded to 16. “Hi!” is 3 bytes and needs 5 characters; with padding on, three = signs would follow.

The last line is the 20-byte ASCII seed used in the RFC 6238 TOTP test vectors.

Limits and tips

  • Text is always encoded as UTF-8. If a system expects Latin-1 or UTF-16 bytes, the result will not match theirs.
  • Base32hex output decodes only with the Base32hex alphabet. Mixing the two gives wrong bytes or an error.
  • This encoder takes text only. It cannot encode raw bytes typed as hex; a 20-byte random key, for example, must come from a tool that outputs Base32 directly.

Frequently asked questions

Is Base32 a way to hide or encrypt text?
No. Base32 has no key and no secret. Anyone can turn it back into the original text in a second with a Base32 decoder. It only changes which characters are used to write the bytes.
Why is Base32 longer than Base64?
Base32 stores 5 bits per character and Base64 stores 6. So 5 bytes become 8 Base32 characters, about 60% longer than the input, while Base64 is only about a third longer. The price buys a smaller, case-insensitive alphabet.
What is the difference between Base32 and Base32hex?
Both come from RFC 4648. Standard Base32 uses A–Z then 2–7. Base32hex uses 0–9 then A–V, which keeps encoded values in the same sort order as the original bytes. Use whichever the receiving system expects; they are not interchangeable.
Should I keep the = padding?
Keep it unless the receiver says otherwise. RFC 4648 pads to a multiple of 8 characters. Many authenticator apps and some APIs leave the = signs off, so untick Pad with = for those.
Why are there no 0, 1 or 8 in standard Base32?
The alphabet skips 0, 1 and 8 so they cannot be confused with the letters O, I and B. That makes Base32 safer to read aloud, print on a label or type from a screen.

Sources

  1. RFC 4648: The Base16, Base32, and Base64 Data Encodings — IETF / RFC Editor, accessed 2026-10-08
  2. RFC 6238: TOTP: Time-Based One-Time Password Algorithm — IETF / RFC Editor, accessed 2026-10-08

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close