Encode and decode text with Base32 — RFC 4648, Base32Hex, and Crockford variants
Base32 occupies a sweet spot between readability and efficiency. <strong>Base64</strong> is more compact (33% overhead vs 60% for Base32), but its use of mixed-case letters and special characters (<code>+</code>, <code>/</code>) makes it problematic in case-insensitive contexts (DNS, Windows file paths), URL query strings (requiring percent-encoding of <code>+</code>), and human-readable contexts (hand-typing a Base64 string is error-prone). <strong>Hexadecimal (Base16)</strong> is the most human-friendly (only 0–9, A–F) but has 100% overhead — every byte becomes two hex characters. <strong>Base32</strong> balances these trade-offs: 60% overhead (tolerable for short data), single-case alphabet (case-insensitive safe), no special characters (URL and filename safe), and groups of 5 bits per character (natural alignment with many binary formats). Key use cases: TOTP secrets in authenticator apps (RFC 6238), DNSSEC key fingerprints, Tor .onion addresses (Base32-encoded public keys), and any scenario where humans need to read, type, or verify encoded data aloud.
The three variants serve different design goals. <strong>RFC 4648 (A–Z, 2–7)</strong> is the IETF standard and most interoperable choice — use it unless you have a specific reason to choose another. The numbers 2–7 (rather than 0–6) were chosen because 0 and 1 are easily confused with O and I/l in some fonts — the standard intentionally omits 0, 1, 8, 9 from the alphabet. <strong>Base32Hex (0–9, A–V)</strong> preserves the natural sort order of the original binary data when the encoded strings are sorted lexicographically — important for databases and file systems where encoded keys are used for ordering. <strong>Crockford</strong> is designed for maximum human usability: it removes ambiguous characters (I, L, O, U), maps lowercase input to uppercase, allows hyphens for readability grouping, and supports an optional mod-37 check character. Crockford is ideal for license keys, product codes, and user-facing identifiers. The PivaBox encoder supports all three variants for free, entirely in your browser.
Base32 is an <strong>encoding</strong> scheme, not an encryption scheme — it transforms the representation of data but provides zero security. Anyone who knows the encoding format can decode the data back to its original form. Think of Base32 like changing the font of a document — it looks different but contains the same information. For secure data storage, combine Base32 with encryption: first encrypt your data using a strong algorithm (AES-256-GCM via the Web Crypto API), then Base32-encode the ciphertext for storage or transmission. This gives you both confidentiality (from encryption) and format compatibility (from Base32). The PivaBox Base32 Encoder processes everything in your browser — your data never touches a server, which is a critical security consideration even for encoding operations. For encryption needs, see the other tools in the PivaBox Crypto suite.