Base64 To Hex Converter
Decode Base64 strings to hexadecimal byte dumps with optional spacing and real-time validation in the browser.
Decode Base64 to a Hexadecimal Byte Dump
Base64 to Hex Converter decodes standard or URL-safe Base64 text into raw bytes, then displays
those bytes as hexadecimal. Choose spaced output, continuous hex, or 0x-prefixed
bytes for quick use in code or debug traces.
Handy for inspecting binary payloads, comparing encoded blobs, or bridging between Base64 data and hex-first tools.
How It Works
- Whitespace is stripped from the input.
- URL-safe characters (
-,_) are normalized for decoding. - Missing padding is added when length modulo 4 requires it.
atobdecodes to a binary string; each byte becomes two hex digits.
Example
Base64: SGVsbG8=
Hex (spaced): 48 65 6C 6C 6F (the word “Hello”)
Frequently Asked Questions
Why does decoding fail for my string?
Base64 must use the correct alphabet and padding. Corrupted text, wrong characters, or truncated data will cause the decoder to reject the input.
Can I paste multi-line Base64?
Yes. Line breaks and spaces are removed before decoding.
Is this the same as Hex to Base64 in reverse?
For valid inputs, decoding Base64 then showing hex is the inverse of encoding hex bytes to Base64, modulo formatting choices.
Where does processing happen?
Entirely in the browser; your Base64 never leaves the page.