Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1981
Encoding utility

Base32 Encoder and Decoder

Encode and decode Base32 and base32hex per RFC 4648. Handles UTF-8 text or raw hex bytes, toggles = padding, and decodes case-insensitively — the shape TOTP / 2FA secrets ship in.

Client-sideRFC 4648TOTP-friendly

Input

Result

Type something to convert.
All conversion runs locally in your browser. Nothing is uploaded — safe for TOTP secrets and keys.

What Base32 is for

Base32 turns arbitrary bytes into a 32-character, case-insensitive alphabet so the result survives copy-paste, voice dictation, QR codes, and case-folding transports that mangle Base64. It trades density for robustness: every five bytes become eight characters, a 60% size overhead versus 33% for Base64. That overhead is a fair price wherever a human might read, type, or dictate the value.

The most common place engineers meet Base32 is the shared secret in a TOTP or HOTP authenticator (RFC 6238 / RFC 4226). The otpauth:// URI behind a 2FA QR code stores its secret parameter in Base32 precisely because it is case-insensitive and avoids the +, /, and = characters that complicate URLs. You will also see Base32 in DNS-based systems, NSEC3 hashes, Bitcoin/onion-style addresses, and anywhere a token needs to be read aloud.

Standard Base32 vs base32hex

RFC 4648 defines two alphabets. Standard Base32 (§6) uses A–Z followed by 2–7. The extended-hex variant, base32hex (§7), uses 0–9 followed by A–V; its advantage is that encoded strings sort in the same order as the bytes they represent, which matters for keys in ordered databases such as DNSSEC NSEC3. The two are not interchangeable — decode with the same alphabet you encoded with, or you will get different bytes back.

Base32

Alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ234567. The default for TOTP, RFC 3548 legacy systems, and most 2FA apps.

base32hex

Alphabet 0123456789ABCDEFGHIJKLMNOPQRSTUV. Sort-order-preserving; used by NSEC3 and ordered key stores.

Padding

Trailing = rounds output to a multiple of 8 characters. Optional in practice — TOTP secrets usually omit it. This tool reads either.

Common mistakes

Related tools

Base64

Standard and URL-safe Base64 for the denser cases.

Open Base64 →

ASCII ↔ HEX

Inspect the raw bytes behind a decoded secret.

Open ASCII ↔ HEX →

More utilities

Parsers, decoders, and references for smart-card and FIDO engineers.

All resources →