My Tools Garage

Base64 to Hex

Decode Base64 and view the bytes as hexadecimal.

in-browser

How to use

  1. 1 Paste your Base64 or Base64url string into the input box.
  2. 2 Choose lowercase or uppercase hex output.
  3. 3 Optionally add a space or colon between each byte.
  4. 4 Review the hex on the right and copy it.

About Base64 to Hex

Base64 and hexadecimal are two common ways of writing the same thing: a sequence of raw bytes.

Base64 packs three bytes into four printable characters, which keeps binary data compact and safe to paste into JSON, email headers or URLs.

Hex spells out each byte as two digits, which is far easier to read when you are inspecting a hash, a key, a token or a packet dump.

This tool bridges the two — paste a Base64 string and it decodes the bytes and re-encodes them as hex in real time.

Both the standard alphabet and the URL-safe variant (with - and _ instead of + and /) are accepted, and padding is optional, so you can drop in a JWT segment, a cryptographic digest or a chunk copied from a config file without cleaning it up first.

Internal whitespace and line breaks from wrapped Base64 are ignored automatically.

You can switch the output to uppercase and add a space or colon between each byte pair, which is handy when matching the style used by tools like openssl, Wireshark or a MAC address.

Everything runs locally in your browser.

Nothing is uploaded, logged or stored, so it is safe for secrets and private data, and it keeps working offline once the page has loaded.

When the hex looks right, copy it with a single click.

FAQ

Does it accept URL-safe Base64?

Yes. The URL-safe characters - and _ are normalised to + and /, and missing padding is allowed, so JWT segments and URL parameters convert directly.

What happens with line breaks in my Base64?

All whitespace, including the line breaks added by wrapped Base64, is stripped before decoding, so multi-line input converts cleanly.

Why do I get an invalid character error?

The input contains a character that is not part of the Base64 alphabet, or its length is one more than a multiple of four, which cannot represent whole bytes.