Base64 to Hex Converter

Decode standard Base64 payloads into two-digit hexadecimal bytes for byte-level inspection, with a reverse mode for rebuilding Base64 from hex.

Last updated: August 2026 | By Workshelve Team

Whitespace and a leading data URL prefix are ignored.

00 01 02 03 fe ff

What Base64-to-Hex Decoding Reveals

Base64 is designed to carry binary data through text-oriented systems, but it hides individual byte boundaries behind four-character encoding groups. Hex makes those bytes visible again: every decoded byte is shown as one two-digit value from 00 through ff.

That makes Base64 → HEX useful when you need to inspect an opaque API field, compare a decoded payload with a byte dump, identify a binary signature, or verify that a Base64 value contains the bytes you expect. The output is a space-separated byte sequence, so boundaries remain easy to read.

This page decodes standard Base64 as raw bytes. It does not assume the result is UTF-8 text, and it does not decrypt, decompress, or reinterpret the payload. Whitespace is ignored, and a leading data:...;base64, prefix is removed before decoding.

How Base64 Becomes Hex Bytes

Decode first, format second

1. Trim surrounding whitespace and remove a Base64 data URL prefix when present.
2. Decode the Base64 characters back into their original 8-bit bytes.
3. Convert each byte to a two-digit hexadecimal value.
4. Join the byte values with spaces so each decoded byte stays visually distinct.
One zero byte
AA==
00
Two bytes with padding
AP8=
00 ff
Three bytes, no padding
AAEC
00 01 02
First four PNG signature bytes
iVBORw==
89 50 4e 47

Base64 padding disappears during decoding because = is only part of the text encoding. The decoded hex contains the real bytes only.

Worked Example: Inspecting a Base64 Payload

Decode AAECA/7/ into hex:

Input:
AAECA/7/
Decode:
The eight Base64 characters decode to six raw bytes. There is no padding because six is a multiple of three.
Bytes:
00 01 02 03 fe ff
Result:
00 01 02 03 fe ff

The leading 00 and high-value fe/ff bytes are preserved exactly. No text interpretation is needed for the conversion.

Base64 to Hex FAQ

Why convert Base64 to hex instead of plain text?

Hex is safer when the decoded payload may be arbitrary binary data. It shows every byte directly, including null bytes and values that are not valid or printable text characters.

Why is the decoded hex shown in two-digit groups?

Each group represents exactly one byte. A byte ranges from 0 to 255, which maps cleanly to hexadecimal 00 through ff.

Where did the Base64 = padding go?

Padding belongs to the Base64 text representation, not to the underlying data. After decoding, only the original bytes remain, so there is no padding byte in the hex result.

Can I inspect a Base64 data URL with this converter?

Yes, when the input begins with a Base64 data URL prefix such as data:image/png;base64,. The prefix is removed and the Base64 payload after the comma is decoded.

Does whitespace inside Base64 affect the result?

No. Spaces, tabs, and line breaks are removed before decoding, which is useful for Base64 copied from wrapped text or formatted documents.

Will the hex output tell me what file type the payload is?

Not automatically. You can inspect the first decoded bytes for known file signatures, but this converter only exposes bytes; it does not classify the payload.

Can this decode Base64URL strings that use - and _?

No. The decoder expects standard Base64. Base64URL uses a different alphabet and should be normalized to standard Base64 before using this mode.

Does decoding Base64 reveal encrypted content?

Only the encoded bytes are revealed. If those bytes are encrypted, compressed, or structured in another binary format, that separate transformation still remains.

Related Tools