Base64 to HEX Converter

Base64 to HEX Converter

Convert Base64 encoded data to hexadecimal representation instantly. Perfect for encoding validation and data inspection.

hex
base64
encoding
Share this tool:
Quick Presets
Base64 strings for conversion to HEX
Input
Enter Base64 encoded text to convert to hexadecimal representation.
How it works: Converts Base64 encoded data to hexadecimal representation. Each Base64 character group maps to hex byte pairs.

What is Base64 to HEX Converter?

The Base64 to HEX Converter transforms Base64 encoded strings into hexadecimal (base-16) format. You paste a Base64 string, and the tool decodes it to binary and then represents each byte as two hex characters (0-9, a-f). This is useful for inspecting binary data, comparing cryptographic hashes, or converting between encoding formats. All processing happens in the browser.

This tool decodes a Base64 string into raw bytes using the browser's atob function, then converts each byte to its two-digit hexadecimal representation. The output is a lowercase hex string. Invalid Base64 input triggers a descriptive error.

Key Features

  • Instant Base64 to hex conversion
  • Lowercase hex output
  • Handles spaces and dashes in input
  • Input validation with error messages
  • Copy hex string to clipboard
  • Quick example presets
  • Runs in the browser with no uploads
  • Lossless conversion

Common Use Cases

When and why you might need this tool

Inspecting cryptographic hashes

Convert a Base64 encoded SHA hash to hex for comparison with other tools that output hex format.

Debugging encoded payloads

Convert Base64 encoded binary data from an API response to hex for byte-level inspection.

Converting between encoding formats

Translate data from Base64 to hex when a downstream system expects hex input.

Analyzing binary file headers

Encode a file header to Base64, then convert to hex to inspect magic bytes or file signatures.

How to Use This Tool

Step-by-step guide to get the best results
1

Paste the Base64 string

Enter the Base64 encoded data in the input field.

2

Convert

Click Convert. The tool decodes the Base64 and outputs the hex representation.

3

Copy the hex string

Copy the result for use in your code or analysis.

Pro Tips

  • 1

    Each pair of hex characters represents one byte.

  • 2

    The hex output is roughly twice the length of the Base64 input.

  • 3

    For SHA-256 hashes, the hex output is 64 characters (256 bits).

  • 4

    The conversion is lossless. You can convert hex back to Base64 to recover the original.

Frequently Asked Questions

What is the difference between Base64 and hex?

Base64 uses 64 characters and encodes 3 bytes as 4 characters. Hex uses 16 characters and encodes each byte as 2 characters. Base64 is more compact, while hex is more readable for binary inspection.

Is the conversion lossless?

Yes. Both Base64 and hex represent the same underlying binary data. Converting between them is completely lossless.

Can I convert SHA hashes?

Yes. Paste a Base64 encoded SHA-256 or other hash and get the hex equivalent directly.

Is my data sent to a server?

No. All conversion happens in your browser using JavaScript. Nothing is transmitted.

What if my input is invalid Base64?

The tool validates the input and shows a specific error message if the string contains invalid characters or incorrect padding.