Base32 Encoder/Decoder

Encode text to Base32 and decode Base32 back to text instantly.

The Base32 Encoder and Decoder converts data between plain text and Base32 encoding, a binary-to-text encoding scheme that represents binary data using a set of 32 ASCII characters. Base32 is widely used in two-factor authentication (TOTP/HOTP), DNS records, and systems that require case-insensitive encoding. This tool processes your data entirely in your browser, ensuring your sensitive information like authentication secrets never leaves your device.

Loading Encoder...
Your data stays in your browser
Tutorial

How to use

1
1

Enter your text

Type or paste the text you want to encode, or a Base32 string you want to decode.

2
2

Choose direction

Click 'Encode to Base32' to convert text, or 'Decode from Base32' to convert Base32 back to text.

3
3

Copy the result

Click the copy button to copy the encoded or decoded result to your clipboard.

Guide

Complete Guide to Base32 Encoding

What Is Base32 Encoding?

Base32 is a binary-to-text encoding scheme defined in RFC 4648 that represents binary data using a 32-character alphabet (A-Z and 2-7). Unlike Base64, Base32 uses only uppercase letters and digits, making it case-insensitive and suitable for systems that don't distinguish between upper and lowercase characters. Each Base32 character represents 5 bits of data, and encoding groups 5 bytes into 8 characters, with padding using the '=' symbol when input length is not a multiple of 5.

Why Use Base32 Instead of Base64?

Base32 is preferred over Base64 in several scenarios. Two-factor authentication (2FA) systems like Google Authenticator use Base32 because the encoded secrets are case-insensitive and easy to type manually. DNS TXT records benefit from Base32 because DNS is case-insensitive. File systems that don't distinguish case also favor Base32. While Base32 produces larger output than Base64 (60% larger), the case-insensitivity advantage is critical in these use cases.

Base32 in Authentication Systems

TOTP (Time-based One-Time Password) and HOTP (HMAC-based One-Time Password) protocols, defined in RFC 6238 and RFC 4226 respectively, use Base32 to encode shared secrets. When you set up 2FA with an authenticator app, the QR code contains a Base32-encoded secret key. Understanding Base32 encoding helps developers implement and debug authentication systems, and helps security professionals audit 2FA implementations.

Best Practices for Base32 Encoding

Always use standard Base32 (RFC 4648) unless your system specifically requires a variant like Base32hex. Include proper padding with '=' characters for interoperability. When handling authentication secrets, process them locally to avoid exposing sensitive data. Validate decoded output to ensure data integrity. Remember that Base32 is an encoding, not encryption — it provides no security on its own.
Examples

Worked Examples

Example: Encode Text to Base32

Given: The text 'Hello' needs to be encoded in Base32.

1

Step 1: Convert each character to its ASCII value: H=72, e=101, l=108, l=108, o=111.

2

Step 2: Convert to binary: 01001000 01100101 01101100 01101100 01101111.

3

Step 3: Group into 5-bit chunks and map to Base32 alphabet: JBSWY3DP.

Result: 'Hello' encodes to 'JBSWY3DP' in Base32 (with padding: JBSWY3DPEE======).

Example: Decode a 2FA Secret

Given: A Base32-encoded TOTP secret 'JBSWY3DPEHPK3PXP'.

1

Step 1: Strip any spaces or padding characters.

2

Step 2: Convert each Base32 character to its 5-bit value.

3

Step 3: Combine bits and extract 8-bit bytes to get the original secret.

Result: The decoded secret is the binary key used by authenticator apps to generate time-based one-time passwords.

Use Cases

Use cases

Encoding binary data

This tool processes your data entirely in your browser, ensuring complete privacy and instant results. It handles a wide variety of input formats and edge cases, making it suitable for both simple one-off conversions and complex workflow integrations. The browser-based processing means no file size limits imposed by server uploads, and your sensitive data never leaves your device.

Case-insensitive encoding

This tool processes your data entirely in your browser, ensuring complete privacy and instant results. It handles a wide variety of input formats and edge cases, making it suitable for both simple one-off conversions and complex workflow integrations. The browser-based processing means no file size limits imposed by server uploads, and your sensitive data never leaves your device.

DNS and file names

This tool processes your data entirely in your browser, ensuring complete privacy and instant results. It handles a wide variety of input formats and edge cases, making it suitable for both simple one-off conversions and complex workflow integrations. The browser-based processing means no file size limits imposed by server uploads, and your sensitive data never leaves your device.

Frequently Asked Questions

?What is Base32 encoding?

Base32 is an encoding scheme that converts binary data into a text format using 32 ASCII characters (A-Z and 2-7). It is defined in RFC 4648 and is commonly used in systems that require case-insensitive encoding.

?What is the difference between Base32 and Base64?

Base32 uses a 32-character alphabet (A-Z, 2-7) while Base64 uses 64 characters (A-Z, a-z, 0-9, +, /). Base32 output is about 20% larger than Base64, but it is case-insensitive and avoids characters that could be confused in certain contexts.

?Why are the characters 0, 1, 8, and 9 not used in Base32?

These digits are excluded to avoid confusion with letters O, I, B, and g. This makes Base32 more human-readable and less error-prone when transcribing manually.

?What are the '=' signs at the end of Base32 output?

The '=' characters are padding to ensure the encoded output length is a multiple of 8 characters. This is required by the RFC 4648 standard for proper decoding.

?Is this Base32 tool safe and private?

Yes. All encoding and decoding happens locally in your browser. No data is transmitted to any server, making it safe for processing sensitive information.

?Can I use this tool on mobile devices?

Yes, this tool works on any device with a modern web browser, including smartphones and tablets. The responsive design adapts to your screen size while maintaining full functionality.

Related Tools

Recommended Reading

Recommended Books on Data Encoding & Web Security

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Professional Products to Boost Your Coding Setup

As an Amazon Associate we earn from qualifying purchases.

How do you like this tool?

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked