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.
The related encoders are the Hex to Base64 Converter and the Base32 Encoder & Decoder, with plain text handled by the Hex to Text Converter. For image payloads specifically, the Base64 to Image Decoder is the tool.
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.
Binary data translation between Base64 and Hexadecimal
The Base64 to Hex converter decodes 6-bit Base64 ASCII representations into raw binary octets and renders them as 8-bit hexadecimal byte pairs. This conversion bridges the gap between text-safe data transmission encodings and low-level byte-oriented debugging formats.
Hexadecimal representation is the industry standard for analyzing cryptographic digests, digital signatures, public key certificates, and network protocol packets. Converting Base64 strings to hex allows security analysts and developers to verify byte alignments, validate checksums, and compare raw hashes against published security bulletins.
- Converts 6-bit Base64 characters into standard 2-digit hexadecimal byte strings.
- Facilitates byte-level inspection of public keys, TLS certificates, and binary tokens.
- Detects padding errors and invalid Base64 characters prior to hex conversion.
- Outputs continuous or formatted hex bytes suitable for cryptographic analysis.
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: