Base32 Encoder / Decoder
RFC 4648 & Crockford — encode, decode, hex mode
Input
Output
Enter input to encode Base32
Try "foobar" → "MZXW6YTBOI======"
About this tool
Encode text or bytes to Base32 and decode back, per RFC 4648: standard alphabet A–Z2–7, optional = padding, case-insensitive decoding, plus a hex input mode and Crockford variant toggle — the everyday need being TOTP secret seeds (e.g. Google Authenticator setup strings) and DNS TXT/DKIM key material. The mechanism is 5-bit ⇄ 8-bit bit-slicing: 5 bytes → 8 characters, with bit-aligned partial-block handling and strict/lenient decode modes.
How to use this tool
Choose mode
Select Encode (text → Base32) or Decode (Base32 → text/hex). The tool auto-detects from your input.
Pick variant
RFC 4648 (standard A–Z2–7) for TOTP/DNS. Crockford (excludes I L O U) for human-readable codes.
Set options
For encoding: choose padding and line-wrap. For decoding: strict/lenient mode controls padding/case validation.
Enter input
Type or paste text. For hex mode, enter hex bytes (e.g., 666f6f or 0x666f6f).
Copy or download
Output appears live. Use Copy button, download .txt, or swap direction to re-encode the result.
Frequently asked questions
What is the Base32 alphabet?
RFC 4648 uses A–Z and 2–7 (32 symbols). Crockford uses 0–9 and A–Z excluding I, L, O, U (also 32 symbols).
Why do TOTP secrets use Base32?
Base32 avoids lookalike characters, is case-insensitive, and fits efficiently in QR codes. RFC 4648 is the standard for TOTP (RFC 6238).
Why is there padding (=)?
RFC 4648 pads to 8-character blocks so decoders know the exact bit-length. Crockford omits padding by design.
What is Crockford Base32?
A variant by Douglas Crockford that removes ambiguous characters (I, L, O, U) for safer human transcription. It's used in some APIs and identifiers.
Why does Base32 output longer strings than Base64?
Base32 encodes 5 bits per character vs Base64's 6 bits. Expansion ratio is 8/5 = 1.6× vs Base64's 4/3 ≈ 1.33×.
Related tools
Base58 Encoder / Decoder
Convert hex or text to Base58 and back, with Base58Check validation (version byte + checksum). IPFS CIDs too. In-browser.
Base64 Toolbox
Professional Base64 workspace for text, files and images with Base64URL, MIME, Data URI, strict validation, image preview and ready-to-use snippets.
BibTeX to JSON Converter
Parse .bib bibliographies into structured JSON with authors, months, macros and LaTeX cleanup, all in-browser.
C# to VB.NET Converter
Convert a subset of C# — classes, methods, variables, loops — into VB.NET
CSV Data Viewer
Paste CSV and inspect it as a sortable, searchable table with delimiter detection and inline export.
CSV Delimiter Converter
Convert CSV delimiters between comma, semicolon, tab, pipe and custom characters safely — quoted fields, embedded commas and newlines stay intact.