Hex to Base64 & Base64 to Hex
Converts byte pairs written in hexadecimal to standard Base64, or decodes Base64 back to lowercase hexadecimal. No character-set conversion is applied to these bytes.
About this hex to base64 & base64 to hex
Hex to Base64 & Base64 to Hex — browser-based utility.
How this tool works
Converts byte pairs written in hexadecimal to standard Base64, or decodes Base64 back to lowercase hexadecimal. No character-set conversion is applied to these bytes.
- Paste the example into “Input”.
- Set “Second input / expression” to encode.
- Click “Run locally” and compare “Output” with the example.
Worked example
Scenario: Convert a four-byte UTF-8 text value with Hex to Base64 & Base64 to Hex
Sample input:
Processing: Converts byte pairs written in hexadecimal to standard Base64, or decodes Base64 back to lowercase hexadecimal. No character-set conversion is applied to these bytes.; Second input / expression = encode
Illustrative output:
Limits and verification
Hexadecimal needs complete byte pairs; spaces, colons, hyphens and 0x markers are accepted. Base64 must use the standard alphabet and zero padding bits. This does not use the Base64url alphabet.
Examples demonstrate an expected workflow; they do not prove every input or every branch of an external specification. Check important results with an independent source before using them for money, security, compliance, safety, or irreversible file changes.
Browser processing boundary
Tool input is processed by code running in the browser and is not intentionally sent to a CZOA processing API. The page can still request ordinary site assets, analytics, or advertising when those services are enabled. Browser extensions and managed-device software remain outside this tool's control.
Relevant references
These references govern or help explain the format, protocol, or calculation used here. Listing a reference does not claim certification or complete implementation of every optional feature.
Content owner: CZOA Tools · Last reviewed: 2026-09-15 · Review methodology
How to use it
- Paste the example into “Input”.
- Set “Second input / expression” to encode.
- Click “Run locally” and compare “Output” with the example.
Frequently asked questions
How does Hex to Base64 encode bytes?+
Encode removes `0x`, whitespace, colons, and hyphens, then requires complete hexadecimal byte pairs and converts those bytes to standard Base64. It does not interpret the bytes as text.
What does the browser fixture return?+
The hex byte string `48656c6c6f` returns `SGVsbG8=`. This is the standard Base64 representation of the five bytes 48 65 6c 6c 6f.
How does decode mode behave?+
Secondary mode `decode` Base64-decodes to bytes and returns lowercase hexadecimal. Invalid Base64 or odd/non-hex encode input raises an error rather than repairing data.
What conversion is not performed?+
It does not translate a character set, preserve source separators, detect a file type, validate a protocol, or prove an encoded value is safe for a particular application.
