Base64 to Hex Converter
Decode Base64 data and re-express it as hexadecimal. Useful when a token, hash or binary blob arrives encoded one way and you need it the other. The ASCII preview helps you spot readable text inside the bytes.
How to use the Base64 to Hex
- 1 Paste your Base64 string into the input field.
- 2 The equivalent hexadecimal bytes appear immediately, with spaces between them.
- 3 Use the grouped view to check byte boundaries when you are inspecting a binary format.
- 4 Copy the hex, or paste hex into the paired Hex to Base64 tool to go back the other way.
How It Works
The Base64 string is decoded to raw bytes, which are then written out as hex. You can choose uppercase or lowercase, add a separator, prefix each byte with 0x or \x, and set how many bytes appear per line.
- Standard and URL-safe Base64
- Tolerates missing padding and whitespace
- Uppercase or lowercase hex
- Separators and 0x / \x prefixes
- Live ASCII preview of the bytes
Frequently asked questions
Why does the hex output have spaces every two characters?
Each byte is two hex digits, so grouping by two makes the byte structure readable. Strip the spaces if you need a continuous string for a tool that expects no separators.
How can I tell if a Base64 string is valid?
Valid Base64 uses only A–Z, a–z, 0–9, + and /, with optional = padding at the end, and its length is a multiple of four. A stray character or a wrong length is the usual reason decoding fails.
Does the conversion handle URL-safe Base64?
Yes. URL-safe Base64 swaps "+" for "-" and "/" for "_" to survive being placed in a query string. The tool accepts both alphabets and reports the equivalent hex either way.
Related Developer Tools
You might also need
Tools from other categories that people pair with the Base64 to Hex: