Base64 to Hex Converter
Decode Base64 into hexadecimal byte values instantly. Paste standard Base64 or Base64URL data and inspect the exact decoded bytes in hexadecimal, decimal and binary form with padding, byte count and validation details.
—
—
—
Base64 to Hex Converter
The Base64 to Hex Converter decodes Base64 data and displays the resulting raw bytes as hexadecimal values. This is useful when Base64 data needs to be compared with a hex dump, protocol specification, memory buffer, firmware payload, cryptographic value or binary file structure.
The conversion works on raw bytes rather than interpreting the Base64 data as text. That means it can correctly process Base64 representing arbitrary binary data as well as ordinary ASCII or UTF-8 text.
How to Convert Base64 to Hex
Paste a Base64 string into the input field. Auto Detect works for most standard Base64 and Base64URL values. You can also explicitly select the expected format and choose how hexadecimal bytes should be displayed.
Click Convert Base64 to Hex. The tool validates the Base64, restores omitted Base64URL padding when necessary, decodes the original bytes and converts every byte to a two-digit hexadecimal value.
Base64:
SGVsbG8=
Decoded bytes:
72 101 108 108 111
Hex:
48 65 6C 6C 6F
Binary:
01001000 01100101 01101100 01101100 01101111Base64 to Hex Example
The Base64 string QUJD represents three bytes. After decoding, those bytes have decimal values 65, 66 and 67.
Base64:
QUJD
Decimal:
65 66 67
Hex:
41 42 43
Binary:
01000001 01000010 01000011How Base64 Becomes Hexadecimal
Base64 characters represent 6-bit indexes. During decoding, those six-bit values are joined into a bit stream and reconstructed into the original eight-bit bytes. Each decoded byte can then be shown using two hexadecimal digits.
Base64
↓
6-bit Base64 indexes
↓
Original 8-bit bytes
↓
Hexadecimal byte pairsWhy One Byte Uses Two Hex Digits
A hexadecimal digit represents four bits. Since one normal byte contains eight bits, exactly two hexadecimal digits are required to represent all possible byte values.
Binary:
11111111
Split into nibbles:
1111 1111
Hex:
F F
Byte:
FFStandard Base64 and Base64URL
Standard Base64 uses the characters + and / for indexes 62 and 63. Base64URL uses – and _ instead, making the encoded data safer in URLs and filenames.
| Index | Standard Base64 | Base64URL |
|---|---|---|
| 62 | + | – |
| 63 | / | _ |
Base64URL also frequently removes trailing equals-sign padding. This converter restores the required padding internally before decoding.
Base64 Padding and Decoded Byte Count
Base64 padding helps identify how many original bytes were present in the final encoding block. Four Base64 characters can represent up to three bytes.
| Base64 | Hex Result | Bytes | Padding |
|---|---|---|---|
| TQ== | 4D | 1 | 2 × = |
| TWE= | 4D 61 | 2 | 1 × = |
| TWFu | 4D 61 6E | 3 | None |
Hex Output Formats
Different development environments display byte arrays differently. This converter supports several output styles while keeping the underlying bytes unchanged.
Space separated:
48 65 6C 6C 6F
Continuous:
48656C6C6F
0x-prefixed:
0x48 0x65 0x6C 0x6C 0x6F
Comma separated:
48, 65, 6C, 6C, 6FBase64 to Hex vs Base64 to Text
Base64 to text conversion assumes the decoded bytes represent characters in a specific character encoding. Base64 to hex does not make that assumption. It simply reveals the raw byte sequence.
For debugging and technical analysis, hexadecimal is often preferable because every byte value from 00 through FF can be displayed directly, including bytes that do not represent printable text.
Where Base64 to Hex Conversion Is Used
Base64-to-hex conversion is useful in network packet analysis, API debugging, cryptography, embedded firmware work, digital certificates, binary file inspection, authentication tokens, protocol payload analysis and reverse engineering.
For example, an API may return a binary field in Base64 while a datasheet or packet capture shows the expected value in hexadecimal. Converting between the two formats makes direct comparison much easier.