Base32 to Hex Converter
Decode an RFC 4648 Base32 string — like a TOTP 2FA secret — back into its raw hex bytes.
How Base32 to Hex Decoding Works
Reverse the encoding process: look up each Base32 character's 5-bit value, concatenate all the bits into one long string, then split that into 8-bit bytes and write each as 2 hex digits. Any = padding characters are dropped first since they carry no data.
Base32 to Hex Example, Step by Step
JBSWY3DP = 48656C6C6F
JBSWY3DP (Base32) = 48656C6C6F (hex, the ASCII text "Hello")
8 Base32 characters = 40 bits 40 bits / 8 = exactly 5 bytes No padding to strip
| Step | Description | Result |
|---|---|---|
| Decode each character | look up each letter's 5-bit value | 40 bits total |
| Regroup into bytes | 40 bits / 8 = 5 bytes evenly | 5 bytes |
| Write as hex | each byte becomes 2 hex digits | 48656C6C6F |
This decodes back to the exact same bytes used in the Hex to Base32 example — encoding and decoding are inverses of each other.
Common Mistakes When Decoding Base32
- Typing 0, 1, 8, or 9 by mistake — standard Base32 doesn't include those characters.
- Forgetting the input length must be a multiple of 8 characters, including any = padding.
- Confusing this with decoding a Base36 or Base64 value, which use different alphabets and grouping.
Frequently Asked Questions
How do you decode Base32 back to hex?
Map each Base32 character back to its 5-bit value, concatenate all the bits, then regroup them into 8-bit bytes and write each byte as 2 hex digits.
Why would I decode a Base32 string to hex?
To inspect the raw bytes behind a TOTP secret key, verify a Crockford-style ID against its underlying value, or feed the bytes into hex-based tooling.
Does this tool accept lowercase Base32?
Yes — it's normalized to uppercase before decoding, since Base32 letters aren't case-sensitive.
What do the = characters at the end mean?
Padding, added during encoding to round the output to a multiple of 8 characters — they're stripped automatically before decoding and don't affect the result.
What happens if I enter an invalid Base32 string?
The calculator flags it — Base32 only uses A-Z and 2-7 (plus = padding), and its length must be a multiple of 8 characters.
Is this the same as decoding Base36?
No — Base36 decodes to a single number. This decodes RFC 4648 Base32 back into raw bytes, a completely different process.