Hex to Base64
Convert any hexadecimal string to standard Base64 — accepts 0x prefix and spaced hex.
Lossless conversion
Parses hex to raw bytes, re-encodes as Base64 — byte-perfect.
Real-time output
Base64 appears as you type — no Convert button needed.
Private by design
Runs entirely in your browser — safe for keys and hashes.
When to convert hex to Base64
Cryptographic outputs — hashes, signatures, key material — are frequently displayed as hex by tools like OpenSSL, Wireshark, and language standard libraries. Converting to Base64 lets you embed those bytes in JSON, HTTP headers, JWTs, or any text-only transport.
Going the other way? Use the Base64 to Hex tool.
Frequently asked questions
›How do I convert hex to Base64?
Paste your hex string (uppercase or lowercase, with or without a 0x prefix, with or without spaces) into the input above. The tool parses the bytes and re-encodes them as standard Base64 — instantly.
›What hex formats are accepted?
Plain hex (48656c6c6f), spaced hex (48 65 6c 6c 6f), and 0x-prefixed hex (0x48656c6c6f) all work. Whitespace and the prefix are stripped automatically.
›Why must hex have an even length?
Each byte is two hex characters, so an odd-length string has a half-byte at the end. The tool will report the error — pad with a leading 0 if you have a partial byte.
›Is the Base64 output standard or URL-safe?
Standard Base64 (uses + and /). For URL-safe Base64 (- and _), you can substitute the characters manually after copying.
›Is my data uploaded?
No. Hex parsing and Base64 encoding both run in your browser — no network requests, no logging, no storage.
More free developer tools
Part of our growing tool belt — all client-side, all free.