Skip to content

Hex to Base64

Convert a hexadecimal string to Base64, standard or URL-safe.

Spaces, colons, hyphens, underscores, line breaks and a 0x prefix are all stripped, so you can paste straight from a hex dump or a certificate fingerprint.

Quick Tool Overview

The Hex to Base64 converter reads hex however it was written — spaced, colon-separated, 0x-prefixed or continuous — and outputs standard or URL-safe Base64 for the same bytes.

What it does
Converts a hex string to Base64
You give it
Hex in any common separator style
You get back
Standard or URL-safe Base64
Best for
Keys, digests, certificate material and packet dumps
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the Hex to Base64

Hex and Base64 are two ways of writing the same bytes. Hex is easier to read a byte at a time, which is why hashes, keys and packet dumps use it; Base64 is a third shorter, which is why payloads and headers use it. Converting between them is a routine step and a fiddly one by hand.

The reader is deliberately forgiving about how the hex is written. Spaces, colons, hyphens, underscores, line breaks and a 0x prefix are all stripped before conversion, so you can paste straight from a hex dump, a certificate fingerprint, a MAC address or an OpenSSL output without cleaning it up first. Output can be standard Base64 or the URL-safe variant that JWTs and query parameters need.

Key features of the Hex to Base64

Forgiving input

Spaces, colons, hyphens, underscores, line breaks and a 0x prefix are stripped, so you can paste straight from a dump or a fingerprint.

URL-safe output

The hyphen-and-underscore alphabet JWTs and query parameters need, with padding optional.

Odd digits caught

An odd number of hex digits means a byte is incomplete, and it is reported rather than silently guessed at.

Byte count shown

How many bytes were read, which is the quickest way to spot a truncated paste.

Never leaves your machine

The conversion is local, so key and certificate material is not uploaded anywhere.

How to use the Hex to Base64

  1. 1

    Paste your hex

    Spaces, colons, hyphens and a 0x prefix are all fine — they are stripped automatically.

  2. 2

    Choose the output

    Standard Base64, or the URL-safe alphabet with hyphen and underscore.

  3. 3

    Check the byte count

    The stat row confirms how many bytes were read, which catches a truncated paste.

  4. 4

    Copy the Base64

    Take the result to your clipboard.

Frequently asked questions

Because each byte is exactly two hex digits. An odd count means at least one digit is missing, and guessing which end it belongs to would silently corrupt the data.

Reviews of the Hex to Base64

What people who use the Hex to Base64 think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Hex to Base64. It takes half a minute and no account.

Write the first review

More developer tools