HEX→64 Encoding Utility

Hex to Base64 Converter

Convert hexadecimal byte data to Base64 instantly. Enter spaced hex bytes, continuous hexadecimal, 0x-prefixed values or common hex-dump style input and encode the exact byte sequence into standard Base64 or Base64URL.

✓ Hex to Base64 ✓ Continuous Hex ✓ 0x Prefix ✓ Base64URL ✓ Binary Breakdown ✓ Copy Output
HEX
Hexadecimal Base64 Encoding
● Ready
Accepted formats include 48 65 6C, 48656C, 0x48 0x65 0x6C, commas, colons, hyphens and line breaks.
Encoding Options
Important: the tool interprets each pair of hexadecimal digits as one raw byte. It does not Base64-encode the visible text characters “4”, “8”, “6”, “5” and so on.
Hex to Base64 Result Encoded
Base64 Output
Input Bytes
Total Bits
Base64 Length
Padding
Normalized Hex
Decimal Bytes
Output Type
Status
Binary & Base64 Breakdown
Validation & Conversion Details

Hex to Base64 Converter

The Hex to Base64 Converter turns hexadecimal byte values into a Base64 encoded string. Each pair of hexadecimal digits represents one byte, and the converter encodes those exact bytes rather than treating the hexadecimal input as ordinary text.

This is useful for developers, network engineers, embedded programmers and anyone working with byte arrays, hexadecimal payloads, file signatures, cryptographic values, API data or protocol messages that must be represented using Base64.

How to Convert Hex to Base64

Enter hexadecimal data into the converter. You can use spaces between bytes, paste a continuous hexadecimal string, add 0x prefixes or use common separators such as commas and colons.

Click Convert Hex to Base64. The calculator validates the hex, converts each byte pair into its numeric byte value, and then applies Base64 encoding to the resulting byte array.

Hex: 48 65 6C 6C 6F Decimal: 72 101 108 108 111 Binary: 01001000 01100101 01101100 01101100 01101111 Base64: SGVsbG8=

Hexadecimal Bytes and Base64

Hexadecimal is a compact representation of bytes. One hexadecimal digit represents four bits, so two hexadecimal digits represent exactly one eight-bit byte.

Hex byte: 4D Binary: 01001101 Decimal: 77 Base64 for this one byte: TQ==

Hex to Base64 Example: ABC

The bytes 41, 42 and 43 correspond to three byte values. Since Base64 processes three-byte blocks naturally, this example produces four Base64 characters without padding.

Hex: 41 42 43 Binary: 01000001 01000010 01000011 Combined: 010000010100001001000011 Base64: QUJD

Continuous Hexadecimal Input

Spaces are not required. A continuous hexadecimal string is divided into two-digit byte pairs automatically.

Spaced: 48 65 6C 6C 6F Continuous: 48656C6C6F Both represent: 48 65 6C 6C 6F Base64: SGVsbG8=

0x-Prefixed Hex Input

Developers frequently write hexadecimal values using a 0x prefix. The converter accepts those prefixes and removes them before processing the byte data.

Accepted: 0x48 0x65 0x6C 0x6C 0x6F Equivalent to: 48 65 6C 6C 6F

Base64 Padding From Hex Bytes

Base64 works with groups of three original bytes. When the number of hex bytes is not divisible by three, standard Base64 adds padding characters.

Hex Input Bytes Base64 Padding
4D 1 TQ== 2 × =
4D 61 2 TWE= 1 × =
4D 61 6E 3 TWFu None

Standard Base64 and Base64URL

The converter can generate either standard Base64 or Base64URL. Both represent the same underlying bytes, but Base64URL uses characters that are safer inside URLs and filenames.

Index Standard Base64 Base64URL
62 +
63 / _

This tool also removes trailing equals-sign padding when Base64URL output is selected.

Hex Text vs Hex Byte Encoding

There are two very different operations that are sometimes both called “hex to Base64.” Correct byte conversion means that hexadecimal 48 represents one byte with decimal value 72.

Hex byte: 48 Byte value: 72 Correct byte Base64: SA== Literal text: "48" ASCII bytes: 34 38 Different Base64: NDg=

This BinaryCon tool performs the first operation: hexadecimal byte data is decoded into bytes before Base64 encoding.

Where Hex to Base64 Conversion Is Used

Hex-to-Base64 conversion appears in software development, web APIs, network protocol analysis, cryptographic workflows, firmware debugging, binary file inspection and data interchange. Documentation may provide a value as a hex dump while another system expects the same bytes as Base64.

The binary, decimal and normalized-hex outputs on this page make it easier to confirm that the exact intended byte sequence was encoded.

Hex to Base64 Converter FAQs

How do I convert hex to Base64?
Enter hexadecimal bytes and click Convert Hex to Base64. The tool converts each hex byte to its raw byte value and then Base64-encodes the resulting byte sequence.
What is 48 65 6C 6C 6F in Base64?
Those hexadecimal bytes represent the five-byte sequence 48 65 6C 6C 6F and encode to SGVsbG8=.
What is 41 42 43 in Base64?
41 42 43 hexadecimal represents three bytes and converts to QUJD.
Can I enter hex without spaces?
Yes. A value such as 48656C6C6F is automatically split into two-digit bytes.
Can I use 0x prefixes?
Yes. Values such as 0x48 0x65 0x6C are accepted.
Why must hexadecimal input contain an even number of digits?
Two hexadecimal digits represent one byte. An odd number of digits leaves an incomplete byte and therefore cannot be interpreted unambiguously.
Does Base64 compress hexadecimal data?
No. Base64 is an encoding and normally increases the textual size compared with the original raw byte sequence.
Is Base64 encryption?
No. Base64 is completely reversible and should not be used as a security mechanism.
Can this tool generate Base64URL?
Yes. Select Base64URL to replace standard + and / characters with – and _ and remove trailing padding.
Does uppercase or lowercase hex change the result?
No. Hexadecimal A-F and a-f represent the same numeric values. The Hex Display option changes only how normalized hex is displayed in the result.
Scroll to Top