Lossless Conversion

Convertisseur Hex ↔ Base64 en Ligne

Convert Hexadecimal (base-16) byte strings to Base64 (base-64) format and vice versa. 100% client-side with real-time feedback.

Hex String Input0 chars
Base64 Output0 chars
SGVsbG8gV29ybGQ=

Foire Aux Questions (FAQ)

How does Hex to Base64 conversion work?

Hex to Base64 conversion translates hexadecimal byte representations (0-9, A-F) into raw binary bytes and then encodes those bytes into 6-bit Base64 ASCII characters. Base64 is significantly more compact than Hex strings.

Why is my Hex string invalid?

A Hex string is invalid if it contains characters outside the 0-9 and A-F range, or if it has an odd number of characters. Hex representation requires two characters per byte.

What is the size difference between Hex and Base64?

Hex encoding expands binary data by 100% (2 hex characters per byte, 16 bits for 8 bits data). Base64 encoding expands binary data by only ~33.3% (4 characters for 3 bytes), making Base64 much more efficient for data transmission.

When should I convert Hex to Base64?

Convert Hex to Base64 when you need to send cryptographic hashes, keys, or binary data through APIs, JSON payloads, or database fields while minimizing bandwidth and payload size.

Outils Connexes