Base64 to Hexadecimal Conversion Tool

Convert Base64 encoded strings to their hexadecimal representation, useful for encoding data in formats that require hexadecimal values.

Input Parameters

Calculation Results

Hexadecimal Output

Calculation Formula

Base64 → Binary → Hexadecimal

Where:
- Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format.
- Binary is converted to hexadecimal by grouping binary digits into sets of 4 and mapping them to their hexadecimal equivalents.
- Each hexadecimal digit represents 4 binary digits (bits).

Base64 to Hexadecimal Conversion Tool Calculator Usage Guide

Learn how to use the Base64 to Hexadecimal Conversion Tool calculator and its working principles

How to Use This Calculator

  1. Enter your Base64 encoded string in the input field.
  2. Click the "Calculate" button to convert the Base64 string to hexadecimal format.
  3. The hexadecimal result will be displayed in the output field.
  4. You can copy the result or reset the form to try a new conversion.

What is Base64 Encoding?

Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format. It is commonly used in email messages, images, and other applications where binary data needs to be stored or transmitted as text.

How Does the Conversion Work?

The conversion process works in two main steps:

  1. Base64 to Binary: The Base64 input is first decoded from its base64 format to a binary string using the JavaScript atob() function.
  2. Binary to Hexadecimal: Each character in the binary string is then converted to its hexadecimal representation by obtaining its Unicode char code, converting it to hexadecimal, and padding with a leading zero if necessary.

Example

For example, if you input the Base64 string SGVsbG8gV29ybGQh, which represents the text Hello World!, the calculator will output the hexadecimal string 48656C6C6F2057696E646F2074686F6E21.