Developer

Encoders, converters & dev utilities

12 tools
Developer · Base64 Converter

Base64 to Hex Converter

Convert a Base64 string into hexadecimal to inspect the raw bytes it encodes. Base64 (RFC 4648) packs 3 bytes into 4 printable characters, while hex shows each byte as two digits 00–ff — so going Base64 → hex simply decodes to bytes and re-prints them in base-16. It is the fastest way to see exactly what a token, key, or binary blob contains. Worked example: the Base64 TWFu decodes to the three bytes 4D 61 6E, which is the hex string 4d616e (and the ASCII text "Man"). Everything runs in your browser — the string is never uploaded. Free, no login.

Quick answer

Base64 → hex = decode to bytes (RFC 4648), then print each byte as two hex digits 00–ff

  • Byte-exact worked example: TWFu → bytes 4D 61 6E → hex "4d616e" (which is also the text "Man")
  • Base64 = 4 chars per 3 bytes; hex = 2 chars per 1 byte — hex is longer but shows every byte plainly
  • 100% client-side (atob + Uint8Array + toString(16)) — the Base64 never leaves your browser
  • Base64 is reversible encoding, not encryption — the hex reveals every byte, nothing is hidden
Open the full Base64 Converter

Frequently asked questions

How do I convert Base64 to hex?

Paste the Base64 string and the tool decodes it to raw bytes, then formats each byte as a two-digit hexadecimal value. For example TWFu decodes to the bytes 4D 61 6E, which prints as the hex string 4d616e. The whole conversion is done in your browser with atob and a Uint8Array, so nothing is sent to a server.

Why is the hex output longer than the Base64?

Because the two formats pack bytes differently. Base64 encodes 3 bytes into 4 ASCII characters (about 1.33 characters per byte), while hexadecimal always uses exactly 2 characters per byte. So the same data is more compact in Base64 and more verbose — but perfectly byte-aligned and readable — in hex. Hex is preferred when you need to inspect or compare individual bytes.

What does the Base64 "TWFu" decode to?

TWFu decodes to the three bytes 0x4D, 0x61, 0x6E — hex 4d616e — which are the ASCII codes for the letters M, a, n, i.e. the text "Man". This is the canonical RFC 4648 example: the three input bytes map cleanly onto four Base64 characters with no padding needed.

Related Base64 Converter pages