Copied to clipboard!
100% Free & Secure — Runs in Your Browser

Base32 Decoder Online

Decode Base32 encoded strings instantly. Supports RFC 4648 standard with automatic padding detection, error handling, and a clean interface built for developers.

Advertisement Space — 728×90

Base32 Decoder

0 characters
0 characters
Advertisement Space — 728×90

How Base32 Decoding Works

A visual step-by-step breakdown of the Base32 decoding process

1

Input: Base32 String

JBSWY3DP
2

Map Each Character to 5-Bit Value

J
= 9
01001
B
= 1
00001
S
= 18
10010
W
= 22
10110
Y
= 24
11000
3
= 29
11101
D
= 3
00011
P
= 15
01111
3

Combine Bits → Split into 8-Bit Bytes

01001000 01100101 01101100 01101100 01101111
4

Convert Bytes to ASCII Characters

H e l l o

Result: "Hello"

Step 1: Enter Base32 String

Paste your Base32 encoded text into the input field. The tool accepts both uppercase and lowercase, with or without padding (=).

Step 2: Automatic Processing

Each character is mapped to its 5-bit binary value using the RFC 4648 alphabet (A-Z, 2-7). Bits are concatenated and regrouped into 8-bit bytes.

Step 3: View Decoded Output

The decoded text appears instantly. Enable "Show hex output" to see the raw byte values. Copy or download the result with one click.

100% Client-Side Security

All decoding happens in your browser. Zero data is transmitted to any server. Your sensitive data — TOTP secrets, encoded messages — stays completely private.

Complete Guide to Base32 Decoding

What is Base32 Encoding and Decoding?

Base32 is a binary-to-text encoding scheme that represents binary data using a set of 32 distinct ASCII characters. Defined in RFC 4648, the Base32 alphabet consists of uppercase letters A through Z and digits 2 through 7. This carefully chosen character set avoids visually confusing characters like the letter "O" and the digit "0", or the letter "I" and the digit "1", making Base32 encoded data particularly suitable for human-readable contexts such as manual entry, QR codes, and printed materials.

Base32 decoding is the reverse process — converting a Base32 encoded string back into its original binary form or readable text. Each Base32 character represents exactly 5 bits of data. During decoding, these 5-bit groups are concatenated and then re-divided into 8-bit bytes to reconstruct the original data. This 5-to-8 bit conversion is why Base32 encoding has a 60% overhead compared to the original data size (8 output bits for every 5 input bits).

How Does Base32 Differ from Base64?

While both Base32 and Base64 serve the same fundamental purpose — encoding binary data as ASCII text — they differ significantly in their approach. Base64 uses a 64-character alphabet that includes both uppercase and lowercase letters, digits, and two additional symbols (+ and /). This makes Base64 more space-efficient with only 33% overhead, but it introduces case sensitivity which can cause problems in case-insensitive environments.

Base32, on the other hand, uses only uppercase letters and a subset of digits, making it completely case-insensitive. This property makes Base32 the preferred choice for applications like TOTP (Time-based One-Time Password) secret keys, where users might need to manually type encoded strings. Google Authenticator, for example, uses Base32 for its secret keys. Base32 is also used in Linux cryptsetup, DNSSEC, and various cryptocurrency wallet backup systems.

Common Use Cases for Base32 Decoding

2FA/TOTP Secret Keys: When setting up two-factor authentication, services provide a Base32-encoded secret key. Decoding it reveals the actual cryptographic key used to generate time-based codes.

Email Security: Some email encryption systems like PGP use Base32 encoding for certain key fingerprints and identifiers that need to be shared in case-insensitive contexts.

QR Code Data: QR codes encoding binary data sometimes use Base32 to ensure the encoded content is safe for text-based QR code readers.

File Hashes: Systems like Git use a modified Base32 encoding (Base32hex) for object hashes, providing case-insensitive identifiers that are safe for filesystems.

Cryptography: Various cryptographic protocols encode keys, initialization vectors, and other binary parameters in Base32 format for safe transmission through text-based channels.

Understanding Base32 Padding

Since Base32 processes data in 5-bit groups but outputs in 8-bit bytes, the total number of input bits may not always be a multiple of 40 (the least common multiple of 5 and 8). To handle this, RFC 4648 specifies using the equals sign (=) as a padding character. Depending on the remainder of the input length when divided by 8, you may see 0, 1, 3, 4, or 6 padding characters. Our decoder automatically handles both padded and unpadded Base32 strings, so you don't need to worry about adding or removing padding manually.

Why Use ToolGalaxy's Base32 Decoder?

Our Base32 decoder is built with simplicity, speed, and security in mind. Unlike many online tools that send your data to remote servers for processing, our decoder runs entirely in your browser using pure JavaScript. This means your sensitive data — whether it's a TOTP secret key, an encrypted message, or any other encoded content — never leaves your device. The tool supports automatic decoding as you type, real-time character counting, hex output viewing, and one-click copy/download functionality. It handles edge cases gracefully, including lowercase input, missing padding, whitespace, and invalid characters, providing clear error messages when something goes wrong.

Technical Implementation Details

The decoder first normalizes the input by converting to uppercase and stripping whitespace. It then validates that all characters belong to the Base32 alphabet. Each character is looked up in a reverse mapping table to obtain its 5-bit value. These values are accumulated into a bit buffer, and every time 8 or more bits are available, a byte is extracted. Any remaining bits at the end that don't form a complete byte are discarded (as they represent padding). The resulting byte array is then decoded as UTF-8 text, with an option to view the raw hexadecimal representation for binary data analysis.

Advertisement Space — 300×250

Related Tools

Explore more encoding, decoding, and developer utilities

Frequently Asked Questions

Common questions about Base32 decoding

Advertisement Space — 728×90