Binary to Hex Converter

Hex result:

How the conversion works

Hexadecimal is base 16, and 16 is 24, so every hex digit maps to exactly 4 binary bits. The converter left-pads your input with zeros until its length is a multiple of 4, splits it into 4-bit chunks, and looks up each chunk's value from 0000-1111 (0-15), printing 10-15 as A-F.

Worked example

Enter 111010110 (9 bits). The tool pads it to 000111010110 (12 bits), then splits it into three groups: 0001, 1101, 0110. Those groups are 1, D, and 6 in hex, so the output is 1D6. Check it: 0x1D6 = 1×256 + 13×16 + 6 = 470, and 111010110 in binary is also 470 in decimal.

Reading the nibble table

BinaryHex
00000
01015
10019
1010A
1111F

Any input outside 0 and 1 is rejected — the field only accepts pure binary strings, not "0b"-prefixed or spaced-out notation.

Why hex instead of binary

Raw binary gets unwieldy past a few bits: a 32-bit value is 32 characters long in binary but only 8 in hex, which is why hex shows up in memory addresses, color codes, and MAC addresses instead of long strings of 0s and 1s.