Главная Base64 to Hex

Base64 to Hex

Decode Base64 strings to hexadecimal representation instantly — handles binary data correctly, 100% in your browser.

Input

Output

Original
Result
Saved

What is Base64?

Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It is commonly used to encode binary data (like images, files or cryptographic hashes) so they can be safely transmitted over text-based protocols such as email, JSON or HTTP. Every 3 bytes of binary data become 4 Base64 characters, with = padding added at the end if needed.

Base64 is not encryption — it provides no confidentiality. It is simply a way to represent binary data as text. Anyone can decode Base64 back to the original bytes, so never use Base64 to store sensitive data without additional encryption.

What is hexadecimal?

Hexadecimal (often called hex) is a base-16 number system that uses 16 symbols: 0–9 and A–F (or a–f). Each hex digit represents 4 bits, so one byte (8 bits) is represented by exactly two hex digits. For example, the byte 255 (binary 11111111) is FF in hex.

Hex is widely used in computing for representing binary data in a human-readable form. You'll see it in memory addresses, color codes (like #FF5733), cryptographic hashes, MAC addresses, and binary file dumps. Hex makes binary data easier to read and compare than raw bytes.

Why convert Base64 to Hex?

Converting Base64 to Hex is useful when you need to inspect or compare the raw bytes of Base64-encoded data. Common reasons include:

  • Inspecting binary data. Convert Base64-encoded data to hex to see the raw byte values for debugging or analysis.
  • Cryptographic operations. Many crypto APIs return data in Base64, but tools often expect hex — converting bridges that gap.
  • Hash comparison. Compare a Base64-encoded hash against a hex representation to verify integrity.
  • Binary file analysis. Convert Base64-encoded file content to hex for low-level inspection.
  • Networking. Inspect Base64-encoded payloads (like data URIs or auth tokens) at the byte level.

How to convert Base64 to Hex

Converting Base64 to Hex with this tool takes a second and happens entirely in your browser. Follow these steps:

  1. Paste your Base64. Enter the Base64 string you want to convert in the input box.
  2. Click "Convert". The converter decodes the Base64 to raw bytes and re-encodes them as hex.
  3. Copy or download. Click "Copy" to copy the hex string, or "Download" to save it as a .txt file.

If the input is not valid Base64, an error message explains the problem (invalid characters or wrong length).

Common use cases

This converter uses the browser's built-in atob() function to decode Base64 to a binary string, then converts each byte to its two-digit hex representation. The output uses uppercase hex digits (A–F) for consistency. Whitespace in the input is ignored, so you can paste wrapped Base64 without issue.

For best results, ensure your input is valid Base64: only the characters A–Z, a–z, 0–9, +, / and = (padding) are allowed, and the length must be a multiple of 4. If you have a URL-safe Base64 string (using - and _ instead of + and /), replace them before converting. This tool focuses on standard Base64.

Is this Base64 to Hex converter free?

Yes, completely free with no sign-up, no limits beyond your device's memory, and no upload.

Does it handle binary data correctly?

Yes. The converter decodes Base64 to raw bytes using atob() and converts each byte to two hex digits, correctly handling all byte values 0–255.

Why is my input rejected?

Base64 must contain only A-Z, a-z, 0-9, +, / and = characters, and its length must be a multiple of 4. Check for typos, extra characters or missing padding.

Is my data uploaded?

No. All conversion is local. Your Base64 data never leaves your browser.