Base32 Encode / Decode
Encode text or files to Base32, or decode Base32 back to text. Supports Standard, Base32hex, Crockford, and z-base-32 variants.
About This Tool
The Base32 Encode / Decode tool converts text and files to and from Base32 encoding directly in your browser. Base32 is a binary-to-text encoding scheme defined in RFC 4648 that represents binary data using a 32-character alphabet. Unlike Base64, Base32 uses only uppercase letters and digits 2-7, which makes it case-insensitive and safe for use in systems that do not distinguish between uppercase and lowercase characters.
Base32 encoding is most commonly encountered in TOTP (Time-Based One-Time Password) and HOTP implementations, where shared secrets are encoded in Base32 for QR codes and manual entry. It is also used in DNS labels, file system names, and any context where case-insensitive alphanumeric strings are required. Many two-factor authentication (2FA) apps like Google Authenticator and Authy rely on Base32-encoded secrets.
This tool supports four Base32 variants.
Standard Base32 (RFC 4648) uses the alphabet A-Z
and 2-7 with = padding.
Base32hex uses 0-9 and A-V, preserving sort order
of the encoded data. Crockford Base32 uses 0-9
and A-Z but excludes the letters I, L, O, and U to reduce
ambiguity when read by humans. It is case-insensitive, maps
common misreadings (O to 0, I and L to 1), and does not use
padding. z-base-32 uses a specially chosen
alphabet optimized for human readability and oral communication,
with no padding.
Compared to Base64, Base32 produces output that is approximately 20% larger (8:5 output-to-input ratio vs. 4:3 for Base64). However, it has advantages in contexts requiring case-insensitive encoding, DNS compatibility, or human-friendly representation. All processing is performed client-side using native JavaScript APIs — your data never leaves your browser.
How to Use
- Select Encode or Decode from the tabs at the top.
- Choose a Base32 variant from the dropdown: Standard, Base32hex, Crockford, or z-base-32.
- Type or paste text into the Input panel. If auto-convert is on, the output updates instantly.
- To encode a file, drag it onto the drop zone or click browse to select a file.
- Toggle Padding (=) to add or remove padding characters for Standard and Base32hex variants.
- Use Swap to exchange input and output, switching direction automatically.
- Click Copy or press Ctrl+Shift+C to copy the output to your clipboard.
FAQ
Is my data safe?
Yes. All encoding and decoding runs entirely in your browser using JavaScript. No data is sent to any server, and nothing is stored or logged.
What is the difference between Base32 and Base64?
Both are binary-to-text encoding schemes, but they use different alphabets and produce different output sizes. Base32 uses 32 characters (A-Z, 2-7) and is case-insensitive, while Base64 uses 64 characters (A-Z, a-z, 0-9, +, /) and is case-sensitive. Base32 output is about 60% larger than the input, while Base64 output is about 33% larger.
Why is Base32 used for TOTP / 2FA secrets?
TOTP secrets are often shared via QR codes or manually typed by users. Base32's case-insensitive, alphanumeric-only output makes it easier to read, type, and copy without errors compared to Base64, which includes mixed case and special characters.
What is Crockford Base32?
Crockford Base32 is a variant designed by Douglas Crockford to be more human-friendly. It excludes the letters I, L, O, and U to avoid confusion with digits 1 and 0 and to prevent accidental profanity. It also maps common misreadings during decoding (e.g., 'O' is treated as '0', 'I' and 'L' are treated as '1').
What is z-base-32?
z-base-32 is a variant that uses a specially designed alphabet (ybndrfg8ejkmcpqxot1uwisza345h769) optimized for human readability and oral communication. It avoids easily confused characters and does not use padding. It is used in some peer-to-peer and cryptographic applications.
What does the padding toggle do?
Standard Base32 and Base32hex pad output with = characters to make the length a multiple of 8. Disabling padding removes these trailing characters. Many modern implementations accept unpadded input, but some strict parsers require padding. Crockford and z-base-32 never use padding.
Can I encode binary files?
Yes. In Encode mode, drag and drop any file onto the input area or click browse to select a file. The file is read as raw bytes in your browser and encoded to Base32. This works for images, archives, documents, and any other binary file.
Related Tools
Base64 Encode/Decode
Encode and decode Base64 strings and files with drag-and-drop support.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes for text and files.
URL Encode/Decode
Encode and decode URLs, parse query parameters, and build query strings.
Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal, and custom bases with bit visualization.
TOTP Generator
Generate and verify Time-based One-Time Passwords (RFC 6238). Create secrets, QR codes, and test 2FA tokens.