Hex to Base64

Convert hexadecimal to Base64 and back, byte for byte. New to Base64? Read the guide.

Hex vs. Base64

Hexadecimal represents each byte as two characters (0–9, a–f), doubling the size. Base64 packs three bytes into four characters, so it is roughly 25% smaller than hex for the same data — which is why Base64 is preferred for embedding or transmitting binary blobs as text.

Hex to Base64 — FAQ

How do I convert hex to Base64?+

Paste a hexadecimal string above (spaces, colons and a 0x prefix are ignored). The tool parses it into bytes and re-encodes those bytes as Base64.

What is the difference between hex and Base64?+

Both represent binary data as text. Hex uses 16 symbols (2 chars per byte, +100% size); Base64 uses 64 symbols (4 chars per 3 bytes, +33% size), so Base64 is more compact.

Why does my hex fail to convert?+

Hex must contain only 0-9 and a-f and have an even number of digits (two per byte). Odd-length or non-hex characters are rejected.

Can I convert Base64 back to hex?+

Yes — switch the direction toggle to Base64 → Hex to get the lowercase hex representation of the same bytes.