IMAGE BASE64 TOOLBase64 decoder

Hex to Base64

Hex to Base64 encodes byte pairs: our four equivalent hex spellings produced AAE=, while odd-length and invalid-character samples produced no output.

Ready. Processing stays in your browser.

Controlled hex spelling and rejection test

We created eight controlled inputs for this run. Four express the same bytes using continuous pairs, spaces, prefixed comma-separated pairs and colon-separated pairs. Two contain different byte sequences. The final two are deliberately malformed: one has an odd digit count and one includes letters outside the hex alphabet. We ran every input through this page's parser and recorded the output or the rejection message.

InputParsed hexBytesBase64Recorded outcome
000100012AAE=Accepted
00 0100012AAE=Accepted
0x00,0x0100012AAE=Accepted
00:0100012AAE=Accepted
0f100f102DxA=Accepted
80ff80ff2gP8=Accepted
abcNot producedNot producedNot producedOdd hex digit count: each byte needs two digits.
00zz01Not producedNot producedNot producedInvalid hex characters.

The four spelling variants all parsed to 0001 and produced AAE=. Their measured parsed byte count was two per input. This result follows from the explicit accepted separators and optional prefixes, rather than from deleting every character that is not a hex digit. The leading byte is part of the input; the parser operates on byte pairs.

The independent input 0f10 produced DxA=. The input 80ff produced gP8=. Each parsed to two bytes. These rows demonstrate actual binary input, including a high byte value, instead of encoding the visible hex characters as a text sentence. The output cells are measurements from the parser run.

The input abc produced no Base64 result. The recorded reason was an odd hex digit count. The input 00zz01 also produced no result; its recorded reason was invalid hex characters. The tool did not pad a missing nibble, discard the invalid letters or reuse the output from an earlier valid input.

Measured input count: eight. Measured accepted input count: six. Measured rejected input count: two. These counts summarize this controlled set and are not a predicted error rate for other inputs. To repeat the run, leave URL-safe output off, paste each table input, encode it and compare the displayed output or message. Before a malformed input, try a valid row; the result box should then clear on rejection.

The four figures below split this same table into equivalent spellings, distinct bytes, the odd-length input and the invalid-character input. Their values are copied from the recorded table. There is no additional experiment behind the figures.

Parsed output for the spelling variants.
Parsed output for the spelling variants.
Parsed output for the distinct byte inputs.
Parsed output for the distinct byte inputs.
Recorded output for the odd-length input.
Recorded output for the odd-length input.
Recorded output for the invalid-character input.
Recorded output for the invalid-character input.

How to encode

Use this hexadecimal to base64 converter for byte pairs, not a decimal number or prose text. Paste hex, encode and copy the result. Spaces, commas, colons and dashes can separate groups; an optional 0x prefix is accepted at the start of each group. Every group must contain complete byte pairs. Output uses standard Base64 with padding unless the URL-safe option is selected. No account or history is required. Input stays in your browser; available memory limits its size.

Does encoding protect the bytes?

No. Encoding is not encryption or an authenticity check. The result can be decoded by anyone who has it.

Is Base64 to hex the same direction?

No. Use the Base64 to hex converter for an encoded input. This page starts with hexadecimal bytes and produces Base64.

Watch the input comparison

Loading the player connects to YouTube, which may process your IP address and playback information. The converter works without loading it.

Watch the published video on YouTube