Base32 Encoder/Decoder

🔤 What is Base32?

Base32 is a binary-to-text encoding scheme that represents binary data using 32 printable ASCII characters. It uses only uppercase letters A-Z and digits 2-7 (or digits 0-9 and letters in other variants), making it case-insensitive and more human-friendly than Base64. Base32 encoded data is approximately 40% larger than the original binary data.

Base32 encoding is primarily used in applications where case-insensitive, alphanumeric encoding is required. It's especially popular in 2FA (Two-Factor Authentication) systems, TOTP secrets, and situations where data needs to be manually typed or spoken. The encoding avoids ambiguous characters, reducing transcription errors.

Real-world applications:

  • Two-Factor Authentication (2FA) secret keys
  • TOTP (Time-based One-Time Password) tokens
  • Filenames and identifiers in case-insensitive systems
  • Human-readable data encoding

⚙️ How This Base32 Encoder/Decoder Works

This comprehensive Base32 tool provides bidirectional conversion with support for multiple Base32 variants. It handles both text and binary data, offering multiple formatting options and flexible output configurations.

🚀 Core Features:

  • Bidirectional Conversion:Switch between Encode and Decode modes in Input Settings.
  • Multiple Input Types:Enter text directly or upload files for encoding.
  • Multiple Base32 Variants:Support for RFC 4648 Standard, Hex, and Crockford Base32 encodings.
  • Real-Time Processing:Instant conversion as you type with live feedback.
  • Drag & Drop Interface:Modern file upload with visual feedback and smart file detection.
  • Multiple Outputs:Add up to 10 different outputs simultaneously with different settings.

📁 File Processing Capabilities:

  • Universal File Support:Handle any file type including documents, images, archives, and binary files.
  • Smart File Detection:Automatic MIME type recognition with appropriate file icons.
  • Size Validation:Built-in 2MB file size limit for optimal browser performance.

🔧 Base32 Variant Features:

  • Standard Base32 (RFC 4648):Uses A-Z and 2-7, the most common Base32 format.
  • Base32 Hex:Uses 0-9 and A-V, sortable and compatible with hexadecimal systems.
  • Crockford Base32:Uses 0-9 and A-Z excluding ambiguous characters (I, L, O, U), optimized for human readability.
  • Padding Options:Enable or disable '=' padding characters based on your requirements.

🎨 Output Formatting Options (Encode):

  • Case Control:Output in uppercase or lowercase for compatibility with different systems.
  • Flexible Formatting:Continuous string, MIME format (76 chars/line), 64 chars/line, or chunked (4/8 char) output.
  • Readability Enhancement:Chunked formats improve readability for manual verification.

⚡ Performance & User Experience:

  • Local Processing:All operations happen in your browser - no data sent to external servers.
  • Copy-to-Clipboard:One-click copying of results for instant workflow integration.
  • Persistent Settings:Auto-save preferences to Local Storage for consistent user experience.

💡 Common Use Cases & Examples

1. 🔐 Two-Factor Authentication (2FA)

  • TOTP Secret Keys:Generate and decode Base32-encoded secrets for authenticator apps.
  • QR Code Data:Create Base32 strings for embedding in 2FA QR codes.
  • Manual Entry:Format secrets with spaces for easier manual typing into authenticator apps.

Example: TOTP Secret

  • Input: random secret bytes
  • Standard Base32: JBSWY3DPEHPK3PXP
  • Chunked (4-char): JBSW Y3DP EHPK 3PXP

2. 📝 Data Encoding & Identifiers

  • Case-Insensitive IDs:Generate identifiers safe for case-insensitive file systems.
  • Human-Readable Codes:Create codes that are easy to read, speak, and type without ambiguity.
  • URL-Safe Tokens:Generate tokens that work in URLs without special encoding.

3. 🔑 Security & Cryptography

  • API Keys:Encode cryptographic keys in a human-friendly format.
  • Seed Phrases:Convert binary seeds to Base32 for backup and recovery.

4. 🔧 Development & Testing

  • Mock Data:Generate Base32 test data for development workflows.
  • Debugging:Decode Base32 strings to inspect their content using Decode mode.
  • Format Conversion:Compare different Base32 variants side by side.

📚 Step-by-Step Tutorial

Example 1: 📝 Encoding Text to Base32

Goal:Convert text content to Base32 with different formatting options.

  1. Set Direction to 'Encode', Input Type to 'Text'.
  2. Enter your text in the input field: 'Hello, World!'
  3. Configure output settings (Mode, Case, Format, Padding).
  4. Click 'Add Output' to see the result.
  5. Add more outputs with different settings for comparison.

Input:Hello, World!

Standard Base32:JBSWY3DPEBLW64TMMQQQ====

Without Padding:JBSWY3DPEBLW64TMMQQQ

Chunked (4-char):JBSW Y3DP EBLW 64TM MQQQ ====

Example 2: 🔍 Decoding Base32 Strings

Goal:Decode various Base32 formats back to original text.

  1. Set Direction to 'Decode' in Input Settings.
  2. Paste a Base32 string (with or without padding/spaces).
  3. Add decode outputs with the correct Base32 variant.
  4. View decoded text in each output. Try different modes if unsure.

Input:JBSWY3DPEBLW64TMMQQQ====

Output:Hello, World!

Example 3: 📁 Processing Files

Goal:Encode files to Base32 for storage or transmission.

  1. Set Direction to 'Encode', Input Type to 'File'.
  2. Drag and drop a file into the upload area.
  3. Add output configurations with desired settings.
  4. Click the result to copy.

🔧 Technical Background

📐 How Base32 Encoding Works

Base32 encoding converts 5 bytes (40 bits) of binary data into 8 Base32 characters (5 bits each). Each 5-bit group maps to one of 32 characters. Standard Base32 uses A-Z (0-25) and 2-7 (26-31). Padding with '=' ensures output length is always a multiple of 8.

Encoding Process Example:

  • Text: 'Hi' → ASCII: [72, 105]
  • Binary: 01001000 01101001
  • 5-bit groups: 01001 00001 10100 10000 (padded)
  • Base32 indices: [9, 1, 20, 16]
  • Base32 result: 'JBKU==== (with padding)'

🔍 Base32 Variant Differences

  • Standard (RFC 4648):A-Z, 2-7. Most widely used, case-insensitive.
  • Hex:0-9, A-V. Maintains lexicographic order, sortable.
  • Crockford:0-9, A-Z (excluding I, L, O, U). Reduces human transcription errors.

🛡️ Security & Privacy

  • Local Processing:All encoding/decoding happens in your browser - no external servers.
  • No Data Persistence:Files and content processed in memory only, never saved.
  • Size Limitations:2MB file limit prevents memory exhaustion.

❓ Frequently Asked Questions

Q: What's the difference between Base32 and Base64?

A: Base32 uses 32 characters (case-insensitive) vs Base64's 64 (case-sensitive). Base32 is more human-friendly and reduces transcription errors but creates ~40% larger output vs Base64's ~33%. Base32 is preferred for TOTP, 2FA, and manual entry scenarios.

Q: Which Base32 variant should I use?

A: Standard (RFC 4648) for TOTP/2FA and general purposes. Hex for sortable data and hexadecimal compatibility. Crockford for maximum human readability and reducing transcription errors.

Q: Do I need padding?

A: It depends on your use case. Standard Base32 typically includes '=' padding. Some systems require it, others don't. For TOTP/2FA, check your authenticator app's requirements.

Q: Is there a file size limit?

A: Yes, files are limited to 2MB maximum for optimal performance.

Q: Are my files and data secure?

A: Absolutely! All processing happens locally in your browser. No files or data are uploaded to external servers.

Q: Can I use this for Google Authenticator?

A: Yes! Google Authenticator uses Standard Base32 (RFC 4648). Add an encode output with Standard mode, uppercase, enable padding, and use 4-char chunks format for easy manual entry.

Q: Why is Base32 output larger than the original?

A: Base32 encoding increases size by approximately 60% (5 bytes become 8 characters). This is the trade-off for using only 32 characters.

🎯 Best Practices & Tips

  • Choose the Right Variant:Standard for 2FA/TOTP, Hex for sortable data, Crockford for maximum human readability.
  • Format for Readability:Use 4-char or 8-char chunks when users need to manually type the encoded data.
  • Padding Considerations:Enable padding for strict RFC 4648 compliance. Disable if your target system doesn't support it.
  • Multiple Outputs:Add multiple outputs with different settings to compare encoding variants side by side.
  • Try Different Modes for Decode:If unsure which variant was used, add decode outputs with different modes to find the correct one.
  • 2FA Best Practices:For TOTP secrets, use Standard Base32, uppercase, with padding, and 4-char chunks for manual entry.

🔗 Related Tools

  • ASCII Converter - Convert text to ASCII codes and vice versa with multiple formats
  • Markdown Previewer - Live Markdown editor with GFM support, tables, task lists, footnotes, TOC, and HTML export
  • Text Diff Comparator - Compare two texts line by line with side-by-side, inline, and unified diff views
  • Format Converter - Convert between YAML, JSON, and TOML formats for configuration files and data exchange
  • XML Formatter & Viewer - Format, validate, and visualize XML documents with tree view, syntax highlighting, and error detection

Input Settings

Add Output

Input
Text → Base32
Any text characters are supported. Results appear in the output sections below.
Standard Upper Continuous Result
Click to copy