Hexadecimal to Base64 Converter

Paste a hexadecimal string and instantly get the Base64-encoded result.

Hexadecimal Input

Base64 Output

Copied!

Summary

Paste a hexadecimal string and instantly get the Base64-encoded result.

How it works

  1. Choose a direction: Hex to Base64, or Base64 to Hex.
  2. Paste or type your input into the input field.
  3. Spaces and optional 0x prefixes in hex input are stripped automatically.
  4. Each two-character hex pair is decoded into a raw byte, then Base64-encoded.
  5. Toggle "URL-safe" to replace + with - and / with _ in the Base64 output.
  6. Click Copy to copy the result to your clipboard.

Use cases

  • Convert cryptographic keys or hashes stored in hex to Base64 for JWT or PEM formats.
  • Encode hex-encoded binary data for embedding in JSON or XML.
  • Verify that a Base64 value matches a known hex representation.
  • Prepare hex color or binary values for Base64-encoded data URIs.
  • Generate URL-safe Base64 tokens from hex-encoded random bytes.
  • Convert hex-encoded SHA/MD5 digests to the Base64 form many APIs expect.
  • Reverse-decode a Base64 string back to its raw hex representation for debugging.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu