Base64 to Hex
Reverse Conversion Tool: Hex to Base64 Converter

What Is a Base64 to Hex Converter?
A Base64 to Hex Converter is a simple yet powerful tool that translates Base64-encoded strings into hexadecimal (base-16) format. This is especially useful for developers, cybersecurity experts, and systems engineers who work with encoded data in applications, APIs, and digital communications.
For example, converting SGVsbG8=
(Base64) yields 48656C6C6F
(Hex).
How Does Base64 to Hex Conversion Work?

The conversion process involves two core steps:
- Decode Base64 to Binary: The Base64 string is decoded into raw binary data.
- Convert Binary to Hex: That binary data is then represented as hexadecimal pairs (00βFF range).
This conversion maintains the integrity of the original data and is ideal for cross-system communication where hex values are required.
Base64 to Hex Conversion Example
Letβs walk through converting the Base64 string SGVsbG8=
to its hexadecimal representation:
π Step 1: Understand the Base64 Input
The input SGVsbG8=
is a Base64-encoded version of the ASCII string “Hello”.
π Step 2: Decode Base64 to Binary (ASCII)
Decode the Base64 string SGVsbG8=
to its original binary (text) form:
SGVsbG8= β Hello
Each character in “Hello” has a corresponding ASCII byte:
H β 72
e β 101
l β 108
l β 108
o β 111
π Step 3: Convert ASCII to Hexadecimal
Now convert each ASCII value to hex:
H (72) β 48
e (101) β 65
l (108) β 6C
l (108) β 6C
o (111) β 6F
β Final Hex Output
Combine the hex values:
Hello β 48 65 6C 6C 6F β **48656C6C6F**
So, the Base64 input SGVsbG8=
becomes:
π· Hexadecimal Output: 48656C6C6F
Convert Base64 to Hex in Code
βΆοΈ Using JavaScript
Buffer.from("SGVsbG8=", "base64").toString("hex"); // "48656c6c6f"
π Using Python
import base64, binascii
binascii.hexlify(base64.b64decode("SGVsbG8=")).decode('utf-8') # "48656c6c6f"
Base64 to Hex Conversion Table Examples
Base64 Input | Hex Output |
---|---|
SGVsbG8= | 48656C6C6F |
V29ybGQ= | 576F726C64 |
MTIzNDU2 | 313233343536 |
These examples show how ASCII strings (e.g., “Hello”, “World”) are first Base64 encoded and then decoded to hex values.
Why Convert Base64 to Hexadecimal?
There are several use cases for converting Base64 to Hex:
- π Cryptographic operations (hashes like SHA256 or HMAC often appear in hex)
- π§ͺ Binary inspection in network packets or encoded strings
- βοΈ Data serialization for APIs, IoT protocols, and embedded systems
- π§° Debugging purposes in JavaScript, Python, or Linux-based applications
Need the reverse? Use our Hex to Base64 Converter to encode hexadecimal into Base64.
Supported Use Cases Base64 to Hex Converter
This converter works seamlessly with:
- β Base64 hashes from JWT or OAuth tokens
- β Binary files encoded for web use
- β
Command-line tools like
base64
(Linux) andcertutil
(Windows) - β
Programming languages like:
- JavaScript:
Buffer.from(base64, 'base64').toString('hex')
- Python:
binascii.hexlify(base64.b64decode(data))
- Java:
DatatypeConverter.parseBase64Binary(base64)
- JavaScript:
Online Base64 to Hex Converter Features
Our tool provides:
- π Instant conversion with no installation
- π One-click switch for Hex to Base64 conversion
- π Easy copy and reset buttons
- π 100% client-side (no data is sent to a server)
Related Tools You Might Need
Also visit our website for a collection of hex conversion and calculator tools.
FAQs β Base64 to Hex
Q1. Can I use Base64 to Hex for encrypted data?
Yes, itβs commonly used in cryptographic tools to interpret encoded hashes or digital signatures.
Q2. Is there a limit to the size of the Base64 string?
Most browsers support large strings, but for very large files, consider using command-line tools.
Q3. What’s the difference between Hex and Base64?
Hex uses 16 characters (0β9, AβF), Base64 uses 64 characters. Base64 is more compact but less readable than Hex.