Hex to Binary Converter: Fast and Simple Data Transformation

Result:

How it works:

Hex to Binary: Each hexadecimal digit (0-F) directly maps to 4 binary digits. The tool converts each hex digit to its 4-bit binary equivalent.

Binary to Hex: Groups of 4 binary digits are converted to their corresponding hexadecimal digit (0-F).

Tip: You can use spaces in binary input for readability. The converter accepts both "11010010" and "1101 0010".

Why 4 Bits Per Hex Digit

Hexadecimal is base 16, and 2 to the 4th power is 16, so every hex digit maps to exactly 4 binary bits with no remainder - unlike octal (base 8, 3 bits per digit), hex conversion never requires padding across digit boundaries for a single-digit lookup.

Worked Example: Hex to Binary

Convert 1A3F to binary, one digit at a time: 1 = 0001, A = 1010, 3 = 0011, F = 1111. Concatenated: 0001 1010 0011 1111. As a check, hex 1A3F equals decimal 6719, and binary 0001101000111111 also equals 6719 (4096 + 2048 + 512 + 32 + 16 + 8 + 4 + 2 + 1).

Worked Example: Binary to Hex

Convert 111010110 (9 bits) to hex: pad to 12 bits (a multiple of 4) by adding three leading zeros: 000111010110. Split into groups of 4: 0001 1101 0110, which convert to 1, D, 6 - giving hex 1D6. Checking: binary 111010110 = 470 in decimal, and hex 1D6 = 1x256 + 13x16 + 6 = 256 + 208 + 6 = 470.

Input Handling

Typing in either field clears the other, since the two conversions run independently rather than syncing live. Binary input accepts spaces between groups for readability (both "11010010" and "1101 0010" parse the same way); the tool strips whitespace before converting.

Where This Comes Up

Direct hex-binary mapping is the reason hex is used as shorthand for binary in low-level programming, memory addresses, and color codes - a 24-bit RGB color like #1A3F0C is really three 8-bit binary channels written compactly.