Free Base64 to Hex Converter Online
Decode Base64 strings to hexadecimal and encode hex back to Base64 instantly in your browser. No upload, no server — fully private.
Input
Output
What Is Base64 to Hex?
Base64 and hexadecimal are both ways of representing binary data as text, but they serve different audiences. Base64 (RFC 4648) is compact and common in APIs, JWTs, and data URIs. Hex is human-readable and the go-to format for debugging binary data, inspecting byte sequences, or working with cryptographic hashes. This tool converts between the two — paste a Base64 string and get space-separated hex bytes back, or paste hex and get Base64. Everything runs in your browser using atob() and typed arrays, so nothing is uploaded anywhere.
Toggle between Decode (Base64 → Hex) and Encode (Hex → Base64) using the mode buttons. All processing runs in your browser — no data is sent to any server.
How to Use This Tool
Choose Mode
Select Decode to convert a Base64 string to hex, or Encode to convert a hex string to Base64.
Paste Input
Paste your Base64 string or hex bytes into the left editor. Use Sample to load an example, or Upload to load from a file.
Copy or Download Result
The right panel updates automatically. Use Copy or Download to save the result.
Example
Decoding a Base64 string to its hex representation byte-by-byte:
Base64 Input
Hex Output
Frequently Asked Questions
How does Base64 to hex decoding work?
The Base64 string is first decoded to raw binary using the browser's built-in atob() function. Each resulting byte is then converted to its two-digit hexadecimal representation. For example, the ASCII character H (decimal 72) becomes 48 in hex.
Can I paste a Data URI (data:...;base64,...) instead of raw Base64?
Yes. The tool automatically strips the data: prefix and MIME type so you can paste a full Data URI directly. Only the Base64 payload after the comma is decoded.
What hex format does the output use?
Each byte is output as a lowercase two-digit hex value, separated by spaces (e.g., 48 65 6c 6c 6f). This is the standard format used by hex editors and most debugging tools. Spaces are stripped automatically when encoding back from hex.
Does this tool support URL-safe Base64 (Base64url)?
The browser's atob() expects standard Base64. If your string uses - and _ instead of + and /, use our Base64 URL Decoder first, or replace the characters manually before pasting.
Is my data private when using this tool?
Completely. All conversion happens locally in your browser with JavaScript. Nothing is transmitted to any server. You can verify this by opening your browser's Network tab while using the tool — you'll see no outbound requests.
Why does encoding fail with odd-length or invalid hex?
Hex strings must have an even number of characters (each byte needs two hex digits). The encoder validates the input and rejects anything that contains non-hex characters or has an odd length. Strip any 0x prefixes or colons before pasting.
Related Tools
The Base64 encoding scheme is defined in RFC 4648. Learn more about hexadecimal notation on Wikipedia. See also MDN: Base64.