Use a byte-to-byte conversion when your data is not text. This example takes the hexadecimal pairs ff, 00 and 80 and represents those same three bytes as Base64. No UTF-8 text decoding is needed, so the invalid text sequence does not prevent this conversion.
Example input
ff0080Expected result
/wCATry it step by step
- Open the Hex and Base64 converter and select Hex to Base64.
- Enter ff0080 and run the conversion. Check the exact result /wCA.
- Choose Base64 to Hex and enter /wCA to recover ff0080.
How to read the result
Each Hex pair represents one byte, so six hexadecimal digits are three bytes. Base64 encodes those bytes in four characters here, with no padding needed for this three-byte input. Converting the literal text ff0080 to Base64 would encode six text characters and produce a different result.
Limits and important details
Hex and Base64 are reversible encodings, not encryption. An odd number of Hex digits or invalid characters is rejected. Binary output does not have to be valid UTF-8 and should not automatically be interpreted as readable text.