Hex to Binary Converter

How the conversion works

Each hex digit (0-9, A-F) represents exactly 4 binary bits, since hexadecimal is base 16 and 16 = 2⁴. The converter reads your input one character at a time, turns each into its 4-bit binary value, and pads shorter values with leading zeros (so 1 becomes 0001, not just 1) before joining them with spaces.

Worked example

Take the hex value "2F". The digit 2 converts to 0010, and F (decimal 15) converts to 1111. Joined together, the tool outputs "Binary: 0010 1111". Each hex character always maps to a fixed 4-bit chunk — that's what makes hex a compact shorthand for binary in the first place.

A second example: FF

"FF" is common in color codes and byte-boundary values. F = 1111 in binary, so FF converts to "1111 1111" — the maximum value a single byte (8 bits) can hold, equal to decimal 255.

Valid input

Only the characters 0-9 and A-F (upper or lower case) are accepted. Anything else — including the "0x" prefix some languages use — triggers an "invalid hex value" message rather than a result, so strip any prefix before pasting a hex string in.