Hexadecimal to Base64 Converter
Paste a hexadecimal string and instantly get the Base64-encoded result.
Hexadecimal Input
Base64 Output
0
Bytes
0
Hex chars
0
Base64 chars
Copied!
Summary
Paste a hexadecimal string and instantly get the Base64-encoded result.
How it works
- Choose a direction: Hex to Base64, or Base64 to Hex.
- Paste or type your input into the input field.
- Spaces and optional 0x prefixes in hex input are stripped automatically.
- Each two-character hex pair is decoded into a raw byte, then Base64-encoded.
- Toggle "URL-safe" to replace + with - and / with _ in the Base64 output.
- Click Copy to copy the result to your clipboard.
Use cases
- Convert cryptographic keys or hashes stored in hex to Base64 for JWT or PEM formats.
- Encode hex-encoded binary data for embedding in JSON or XML.
- Verify that a Base64 value matches a known hex representation.
- Prepare hex color or binary values for Base64-encoded data URIs.
- Generate URL-safe Base64 tokens from hex-encoded random bytes.
- Convert hex-encoded SHA/MD5 digests to the Base64 form many APIs expect.
- Reverse-decode a Base64 string back to its raw hex representation for debugging.
Frequently Asked Questions
Last updated: 2026-06-10 ·
Reviewed by Nham Vu