Base32 Decode & Encode

Decode Base32 to text or encode text to Base32

What is Base32 Decode & Encode?

Base32 is a binary-to-text encoding scheme defined in RFC 4648 that represents binary data using 32 printable characters (A-Z and 2-7). It is widely used in TOTP (Time-based One-Time Password) secrets for two-factor authentication apps like Google Authenticator and Authy, DNS records (Base32hex variant), and systems where case-insensitive encoding is required — such as filenames on case-insensitive filesystems like Windows NTFS and macOS HFS+. Unlike Base64, Base32 is case-insensitive and deliberately excludes visually ambiguous characters (0/O, 1/I/l), making it safe for manual entry by humans. The trade-off is size: Base32 output is approximately 60% larger than the original binary data, compared to Base64's 33% overhead.

How to Use

  1. Select Decode or Encode mode using the toggle buttons at the top.
  2. For decoding: paste your Base32 string (e.g., a TOTP secret from a 2FA QR code) in the input area.
  3. For encoding: enter plain text to convert to Base32 format.
  4. Click the action button (Decode or Encode) to process your input.
  5. Copy the result from the output panel using the Copy button.

Why Use This Tool?

Decode TOTP secrets for 2FA setup — verify the secret encoded in your authenticator QR code
Encode data for case-insensitive systems where Base64 would break due to case sensitivity
No ambiguous characters — 0/O, 1/I/l are excluded, reducing manual entry errors
Works entirely in your browser — no data sent to servers, safe for sensitive 2FA secrets
Bidirectional: both decode and encode in one tool, with a simple mode toggle

Tips & Best Practices

  • Base32 uses A-Z and 2-7 (32 characters total). Padding with = is optional for decoding.
  • Base32 is case-insensitive — both uppercase and lowercase input work for decoding.
  • Base32 output is ~60% larger than the original data (vs ~33% for Base64). Use Base64 when size matters.
  • For most general-purpose encoding, Base64 is more efficient; use Base32 specifically when case-insensitivity or human entry is required.

Frequently Asked Questions

When should I use Base32 instead of Base64?

Use Base32 when you need case-insensitive encoding (e.g., TOTP secrets, DNS records, filenames on case-insensitive filesystems). Base64 is more compact but case-sensitive. Base32 avoids ambiguous characters like 0/O and 1/I/l, making it better for manual entry.

When should I NOT use Base32?

Avoid Base32 when: size efficiency matters (Base64 is 33% overhead vs Base32's 60%); you are encoding data for URLs (use URL-safe Base64 instead); your system handles case-sensitive strings natively; or you need to encode very large files (the size overhead becomes significant).

What characters does Base32 use?

Standard Base32 (RFC 4648) uses A-Z (26 letters) and 2-7 (6 digits), totaling 32 characters. The = character is used for padding. This alphabet was chosen to avoid visually similar characters.

Why is my TOTP secret Base32 encoded?

TOTP (Time-based One-Time Password) secrets are Base32 encoded because users often need to type them manually when setting up 2FA. Base32 is case-insensitive and avoids ambiguous characters, making manual entry less error-prone than Base64.

Is Base32 encoding or encryption?

Base32 is encoding, not encryption. It transforms data into a different representation but provides no security. Anyone can decode Base32. Never use Base32 to protect sensitive data — use proper encryption (AES, RSA) instead.

Is my data processed securely?

Yes. All encoding and decoding happens entirely in your browser using JavaScript. Your data is never sent to any server, stored, or transmitted. You can safely decode TOTP secrets and other sensitive data.

Real-world Examples

Decoding a TOTP secret for 2FA verification

When setting up two-factor authentication, the QR code contains a Base32-encoded secret. Decode it to verify it matches what your authenticator app shows.

Input
JBSWY3DPEHPK3PXP
Output
Hello!

Encoding a configuration value for case-insensitive storage

Encode a database connection string for storage in a case-insensitive system like Windows environment variables or DNS TXT records.

Input
server=db.example.com:5432
Output
ONUGC4TFOR2GCZDBONUHG5DSOJUXI2I=

Related Tools