How to convert binary to hex
- Paste binary into Input, one number per line. Spaces between groups of bits are ignored.
- Each line is converted to hex as you type.
- Untick Uppercase hex for lowercase digits, then copy the result.
Converting binary to hex by hand
Split the bits into groups of four, starting from the right. If the leftmost group is short, pad it with zeros. Then swap each group for its hex digit from the table below. For 1011011101:
- Group from the right: 10 1101 1101.
- Pad the first group: 0010 1101 1101.
- Look up each group: 0010 is 2, 1101 is D, 1101 is D.
The answer is 2DD. Starting from the right matters: grouping 1011011101 from the left would give 1011 0111 01 and the wrong digits.
Four-bit groups and their hex digits
| Binary | Hex | Binary | Hex |
|---|---|---|---|
| 0000 | 0 | 1000 | 8 |
| 0001 | 1 | 1001 | 9 |
| 0010 | 2 | 1010 | A |
| 0011 | 3 | 1011 | B |
| 0100 | 4 | 1100 | C |
| 0101 | 5 | 1101 | D |
| 0110 | 6 | 1110 | E |
| 0111 | 7 | 1111 | F |
A group of four bits is called a nibble, half a byte. So a byte is always exactly two hex digits, which is why hex dumps and colour codes use pairs of digits.