{ ILoveJS }

Base64 to Hex

Convert Base64 encoded data to hexadecimal.

base64hexconvert

What is Base64 to Hex?

The Base64 to Hex tool converts Base64 encoded strings into their hexadecimal representation. Base64 and hex are both common encoding formats, but they serve different purposes — Base64 is often used to safely transmit binary data as ASCII text, while hexadecimal is the preferred format for inspecting raw bytes, working with cryptographic hashes, and low-level data manipulation. This tool bridges the gap between the two formats in a single step.

For developers, this conversion is essential when working with binary protocols, certificate data, cryptographic keys, or any scenario where a Base64 payload needs to be examined at the byte level. Rather than writing a custom decode-then-encode script, this tool gives you instant, reliable output you can copy directly into your code, logs, or debugging workflow.

How to Use

Using the tool is straightforward: paste your Base64 encoded string into the input field and the hexadecimal output is generated immediately. The input should be a valid Base64 string — standard Base64 using the characters A–Z, a–z, 0–9, +, and /, with optional = padding at the end. URL-safe Base64 variants (using - and _ instead of + and /) are also commonly supported. The output will be a continuous or space-separated hex string representing the decoded byte values.

The conversion works by first decoding the Base64 string back to its raw binary data, then re-encoding each byte as a two-character hexadecimal value. For example, the Base64 string SGVsbG8= decodes to the ASCII text "Hello", which in hex is 48 65 6c 6c 6f. This makes it easy to verify the actual bytes behind any Base64 payload.

A few edge cases to keep in mind: invalid Base64 characters or incorrect padding will cause a decoding error, so ensure your input is well-formed before converting. Very long Base64 strings — such as encoded images or binary files — will produce proportionally long hex output. If your Base64 string represents binary data rather than text, the hex output is often the most useful way to inspect it, since raw binary cannot be displayed as readable characters.

Use Cases

Cryptography debugging: When working with cryptographic keys, signatures, or digests delivered in Base64 format, converting to hex lets you compare byte-by-byte against expected values or reference implementations.
Network protocol analysis: Binary payloads in protocols like SAML, JWT, or custom TCP formats are often Base64 encoded for transport. Converting to hex helps you inspect the raw message structure and verify field boundaries.
Certificate and key inspection: X.509 certificates and PEM-encoded keys are Base64 wrapped DER data. Converting to hex is the first step when manually parsing certificate fields or troubleshooting TLS/SSL issues without a full openssl toolchain.
Embedded and firmware development: Binary firmware blobs or memory dumps sometimes arrive as Base64 strings from APIs or configuration files. Converting to hex gives you the familiar format needed for flashing tools, hex editors, or memory comparison utilities.

Related Tools