Developer

Base64 to Hex Converter

Convert Base64 to hexadecimal and hex back to Base64 at the byte level. Useful for keys, hashes, certificates and binary data.

Last reviewed by the Radiatus Cloud team

Convert between Base64 and hexadecimal representations of the same bytes.

Need this built for your product?

We design, build & host secure software & APIs.

Talk to an engineer

Convert between Base64 and hex

Base64 and hexadecimal are two common ways to represent binary data as text, and this tool converts between them at the byte level. It first decodes the Base64 into raw bytes, then writes each byte as two hexadecimal digits, and does the reverse by reading pairs of hex digits back into bytes and re-encoding as Base64. Because both formats describe the exact same underlying bytes, the conversion is lossless and round-trips perfectly.

Hexadecimal is shown in both lowercase and uppercase, since different tools and standards prefer each, and the byte count is reported so you can verify the length.

Where this conversion is used

Cryptographic material is frequently presented in one format in one place and the other elsewhere. Hashes and keys are often shown in hex, while certificates, tokens and binary payloads commonly travel as Base64. Developers working with TLS certificates, JWTs, API keys and binary protocols regularly need to switch between the two to compare values or feed them into a tool that expects a particular format.

Base64 is more compact, using about four characters per three bytes, while hex uses two characters per byte but is easier to read byte by byte. All conversion happens locally in your browser, so sensitive data never leaves your device.

Related tools

  • JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
  • JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
  • Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
  • HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.

Frequently Asked Questions

Why convert between Base64 and hex?

Both represent the same bytes, but different tools expect different formats. Hashes are often hex while certificates and tokens are often Base64, so you need to switch between them.

Is the conversion lossless?

Yes. Both formats describe the exact same underlying bytes, so converting one way and back reproduces the original data perfectly.

Why does hex need an even number of digits?

Each byte is exactly two hex digits. An odd number of digits means an incomplete byte, so the input would be invalid.

Which is more compact?

Base64 is more compact, using about four characters for every three bytes, while hex uses two characters per byte but is easier to read one byte at a time.

Is my data uploaded?

No. The conversion runs entirely in your browser, so keys, hashes and other sensitive data never leave your device.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Paste Base64 to get hex, or hex to get Base64.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.