User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Base32 Input 0 chars
Decoded Text
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Base32 encoding represents binary data using a 32-character alphabet, producing output that is case-insensitive and safe for case-folding filesystems, DNS labels, and human verbal communication. RFC 4648 defines the canonical alphabet (A - Z, 2 - 7) with = padding. Each input byte (8 bits) maps to 85 output characters, yielding a 160% size expansion. Incorrect variant selection or stray characters cause silent data corruption. This tool validates the input alphabet, strips whitespace, and decodes the bitstream faithfully.

Four variants are supported. Crockford excludes I, L, O, U to avoid human misreading. z-base-32 reorders characters to place the most visually distinct glyphs at the highest-frequency bit patterns. Base32Hex preserves sort order by using 0 - 9 then A - V. Mixing alphabets between variants produces garbage output without any error signal from a naive decoder. This converter detects alphabet mismatches and warns before producing output.

base32 decoder encoder text converter RFC 4648 Crockford base32hex encoding

Formulas

Base32 encoding maps every 5 bits of input to one character from a 32-symbol alphabet. Decoding reverses this: each character yields a 5-bit value, the bits are concatenated, and the resulting bitstream is split into 8-bit bytes.

nchars = nbytes ร— 85

The total output length is rounded up to the nearest multiple of 8 with = padding (in RFC 4648 and Base32Hex):

npadded = 8 ร— ceil(nchars8)

Decoding algorithm per character ci:

bits = bits + pad(toBinary(lookup(ci)), 5)

Then extract bytes:

bytej = bits[j ร— 8 .. (j + 1) ร— 8]

Where nbytes is the number of input bytes, nchars is the number of Base32 characters (excluding padding), lookup maps a character to its 0 - 31 integer value using the selected variant's alphabet, and pad left-pads the binary string to 5 digits.

Reference Data

VariantAlphabetPaddingCase SensitiveStandardUse Case
RFC 4648 (Standard)A - Z, 2 - 7=NoRFC 4648 ยง6SASL, XMPP, general encoding
Base32Hex0 - 9, A - V=NoRFC 4648 ยง7Sort-preserving encoding, NSEC3
Crockford0 - 9, A - HJ - KM - NP - TV - WNoneNoCrockford specHuman-readable IDs, check symbols
z-base-32ybndrfg8ejkmcpqxot1uwisza345h769NoneYes (lower)z-base-32 specMnet-URI, human-oriented hashes
Encoding Size Comparison (per input length)
Input BytesBase32 CharsPadding CharsTotal OutputBit WasteExpansion Ratio
12682 bits800%
24484 bits400%
35381 bit267%
47183 bits200%
58080 bits160%
Character Encoding Reference
Value 0RFC: AHex: 0Crockford: 0z-base: y
Value 9RFC: JHex: 9Crockford: 9z-base: e
Value 15RFC: PHex: FCrockford: Fz-base: x
Value 25RFC: ZHex: PCrockford: Pz-base: 3
Value 31RFC: 7Hex: VCrockford: Wz-base: 9

Frequently Asked Questions

You get corrupted output without any error. For example, the Crockford alphabet maps character I to 1 and O to 0, while RFC 4648 treats I as value 8. A single character mismatch shifts 5 bits, cascading errors through every subsequent byte. Always verify the source system's variant before decoding.
Base32 uses 5 bits per character versus Base64's 6 bits. For n input bytes, Base32 produces ceil(n ร— 8 รท 5) characters (160% expansion) while Base64 produces ceil(n ร— 8 รท 6) characters (133% expansion). The tradeoff is case insensitivity and better human readability.
Padding ensures output length is always a multiple of 8. Since 5 input bytes map perfectly to 8 Base32 characters, any input not divisible by 5 requires padding. Specifically: 1 byte โ†’ 6 pads, 2 bytes โ†’ 4 pads, 3 bytes โ†’ 3 pads, 4 bytes โ†’ 1 pad. Crockford and z-base-32 omit padding entirely.
Yes. Base32 encodes arbitrary binary data. When decoding such data back, the result is raw bytes. If those bytes are not valid UTF-8, this converter will show replacement characters (U+FFFD) or display the hex dump instead. For binary payloads, use the hex output mode or download the result as a raw file.
The converter processes inputs up to 5 MB of encoded text. Beyond this, browser memory constraints make in-page processing unreliable. For a 5 MB Base32 string, the decoded output is approximately 3.125 MB (ratio of 5 รท 8). Processing time is under 200 ms for typical inputs.
Crockford's specification defines an optional check symbol appended as the last character. The check value is the remainder of dividing the numeric value by 37, mapped to symbols 0 - 9, A - Z, *, ~, $, =, U. This converter strips check symbols during decode. Enable the check-symbol option to validate before stripping.