Skip to content
rusthacks.dev
Web

Base32 Encoder and Decoder

Encode text to Base32 or decode it, with the RFC 4648 alphabet used by TOTP secrets, base32hex, or Crockford's alphabet used by ULIDs.

Free · No sign-up · Your inputs stay in your browser

Input

Encode or decode Base32

Output

Result

32 characters

Base32 uses only capitals and digits, so it survives case-insensitive systems and being read aloud. TOTP secrets in authenticator apps are RFC 4648 Base32; ULIDs use Crockford's alphabet, which drops I, L, O and U.

Runs in this browser. Nothing you paste is sent to a server.

Why Base32 exists

Base32 uses only capital letters and digits, so it survives case-insensitive systems, file names on any file system, and being read aloud or typed from a printout. The cost is size: 60 percent larger than the input, against 33 percent for Base64. RFC 4648 section 6 defines the standard alphabet A-Z and 2-7.

Three alphabets

The authenticator app secrets behind TOTP use the RFC 4648 alphabet. base32hex, section 7 of the same RFC, keeps sort order the same as the raw bytes. Douglas Crockford's variant leaves out I, L, O and U to avoid misreading, and is what ULIDs are written in.

Share

Frequently asked questions

How much bigger is Base32 than the original?
Every 5 bytes become 8 characters, so 60 percent larger, plus padding to a multiple of 8 characters.
Is a 2FA secret Base32?
Yes. The secret in an otpauth:// URI and the text code shown under a QR code are RFC 4648 Base32, usually without padding.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Flat illustration for the post “Path Traversal in Rust File Servers and Safe Joins”, composed around security.
Security

Path Traversal in Rust File Servers and Safe Joins

A user-supplied filename like ../../etc/passwd escapes your upload directory. Reject components, canonicalize and verify the prefix, and see why Path::join with an absolute path is a trap.

3 min read
Flat illustration for the post “Rust Error Connection Refused From Reqwest and Sockets”, composed around errors.
Tooling

Rust Error Connection Refused From Reqwest and Sockets

Connection refused means nothing was listening at that address and port. Check the bind address, localhost versus 127.0.0.1, containers and Docker networks, startup order and the wrong port, with commands for each.

4 min read

Keep planning

Similar tools