Skip to content

Base32 Encoder/Decoder

Encode and decode Base32 data with support for multiple variants including RFC 4648, Base32 Hex, Crockford, and z-base-32. Perfect for TOTP secrets, DNS records, and case-insensitive identifiers.

Category: text
Use Case: TOTP Authentication, DNS Records, Case-Insensitive IDs
Privacy: 100% browser-based

Encoding Options

A-Z, 2-7 (most common)

RFC 4648 compliant padding

0 characters

Recommended Settings

Base32 Encoding Best Practices

  • Use Standard Base32 (RFC 4648) for TOTP secrets and general interoperability
  • Choose Crockford Base32 for human-readable codes with error tolerance
  • Enable padding for RFC 4648 compliance unless both systems agree to omit it
  • Base32 increases data size by ~60% compared to original (vs Base64's 33%)
  • Remember: Base32 is encoding, not encryption - don't use it for security

Common Use Cases

  • TOTP/2FA: Encode authentication secrets for Google Authenticator, Authy, etc.
  • DNS records: Create case-insensitive identifiers for DNS TXT records
  • Torrent files: Encode infohashes in Base32 for magnet links
  • Git commits: Short Base32 SHAs for human-readable version identifiers
  • File naming: Generate safe, case-insensitive filenames from binary data

Pro Tips

  • Live conversion updates automatically as you type for instant feedback
  • Upload files to encode/decode larger datasets without copy-paste
  • Crockford variant auto-corrects I→1, L→1, O→0 for error-tolerant decoding
  • z-base-32 avoids visually similar characters for the best human readability

Most Popular

Most users prefer Standard Base32 (RFC 4648) with padding enabled for TOTP and general use

When to Use This Tool

Case-Insensitive Encoding

Use Base32 when you need case-insensitive encoding for systems that don't distinguish between uppercase and lowercase. Perfect for domain names, DNS records, URLs, or file names where case sensitivity could cause issues. Base32 avoids ambiguous characters (0/O, 1/I/l) making it ideal for human-readable identifiers.

Recommended: DNS & URLs

Data Integrity & Checksums

Generate checksums, hash digests, or unique identifiers using Base32 encoding. Commonly used in TOTP (Time-based One-Time Password) authentication, git commit SHAs, and torrent infohashes. The Crockford variant is specifically designed for check digits and error correction in user-facing codes.

Recommended: Security & Verification

File Encoding & Storage

Encode binary files, images, or data for storage in text-only systems or transmission over text-based protocols. Base32 is more efficient than Base64 for case-insensitive systems and provides better error detection. Use z-base-32 variant for maximum human readability in printed codes or manual entry.

Recommended: File Transmission

How It Works

1

Choose Encode or Decode mode using the toggle buttons at the top

2

Select Base32 variant: Standard (most common), Hex (sortable), Crockford (human-readable), or z-base-32

3

For Standard/Hex variants, optionally enable or disable padding (=)

4

Type or paste your text (encode) or Base32 string (decode) in the input field

5

The tool automatically converts as you type with live preview

6

For encode: Text is converted to UTF-8 bytes, then groups of 5 bits are mapped to Base32 alphabet

7

For decode: Base32 characters are converted back to 5-bit groups, then reassembled into bytes

8

Crockford decoding normalizes ambiguous characters (I/L→1, O→0) for error tolerance

9

Whitespace and hyphens are automatically removed during decoding for formatted strings

10

Padding (=) is added or removed based on variant and settings for proper encoding length

11

Click Upload to load file contents, or use Copy/Download to export results

12

All processing happens in browser - your data never leaves your device

100% Private

Files never leave your device. All processing happens locally in your browser.

Lightning Fast

Powered by Client-side JavaScript with custom Base32 implementation supporting RFC 4648, Hex, Crockford, and z-base-32 variants for optimal performance on modern browsers.

Open Source

Built with verified, open-source libraries. Fully transparent.

Frequently Asked Questions

What is the difference between Base32 and Base64?

Base32 uses only 32 characters (A-Z, 2-7 for standard) compared to Base64's 64 characters. This makes Base32 case-insensitive and avoids look-alike characters. Base32 encoded data is about 20% larger than Base64, but it's more suitable for URLs, filenames, and manual entry. Base64 is more compact but case-sensitive and includes special characters (+, /).

Which Base32 variant should I use?

Standard Base32 (RFC 4648) is the most common for general use and TOTP authentication. Base32 Hex uses 0-9,A-V for sorting compatibility. Crockford Base32 is designed for human-readable codes with check digits - it excludes confusing characters (I,L,O,U) and is case-insensitive. Z-base-32 optimizes for human readability by avoiding similar-looking characters.

What is padding and do I need it?

Padding (=) is added to make the encoded length a multiple of 8 characters. Standard Base32 and Base32 Hex require padding per RFC 4648. Crockford and z-base-32 variants don't use padding. For standard compliance and interoperability, keep padding enabled. You can disable it for shorter output when both encoder and decoder agree to omit it.

Can I decode Base32 with spaces or hyphens?

Yes! The decoder automatically removes whitespace and hyphens, making it easy to decode formatted Base32 strings. This is useful when Base32 codes are displayed with separators for readability (e.g., ABCD-EFGH-IJKL-MNOP). Crockford Base32 also normalizes ambiguous characters (I/L→1, O→0) for error tolerance.

How does Crockford Base32 handle ambiguous characters?

Crockford Base32 automatically converts similar-looking characters during decoding: I and L become 1, O becomes 0. This makes it forgiving for manual entry where users might confuse these characters. The encoding alphabet excludes these ambiguous letters entirely, using only 0-9 and A-Z (excluding I, L, O, U).

What is TOTP and why does it use Base32?

TOTP (Time-based One-Time Password) is used in 2-factor authentication apps like Google Authenticator. The secret keys are encoded in Base32 because QR codes and manual entry benefit from case-insensitive, human-readable encoding. Base32 ensures compatibility across different systems and reduces user error when entering codes manually.

Can I encode binary files or only text?

You can encode any data - text or binary. For text, the tool converts it to bytes (UTF-8) then encodes. For binary files, use the file upload feature to load the file contents and encode them. The decoded output will be interpreted as UTF-8 text. For pure binary data preservation, ensure your system handles the decoded bytes correctly.

Is my data secure using this tool?

Absolutely! All encoding and decoding happens entirely in your browser using JavaScript. Your data is never sent to any server, uploaded anywhere, or stored remotely. Everything runs 100% locally client-side, ensuring complete privacy. Remember: Base32 is encoding, not encryption - it doesn't provide security, only format conversion.