How to use the Binary to Hex Converter
- Type or paste the binary number into the first box.
- Read the hex result in the second box, and click Copy to copy it.
- Scroll to How it works for the step-by-step method.
How to convert binary to hex
Split the binary number into groups of four bits, starting from the right, and add leading zeros to the last group if needed. Then replace each group with its hex digit using the table below.
Example: 1101 0110 → D and 6 → D6. That's why programmers like hex: one byte is always exactly two hex digits.
Reference table
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 8 | 10 |
| 9 | 1001 | 9 | 11 |
| 10 | 1010 | A | 12 |
| 11 | 1011 | B | 13 |
| 12 | 1100 | C | 14 |
| 13 | 1101 | D | 15 |
| 14 | 1110 | E | 16 |
| 15 | 1111 | F | 17 |
Frequently asked questions
Why groups of four?
Four bits have 16 possible values (0000 to 1111), exactly the number of hex digits, so each group maps to one digit.
What is 11111111 in hex?
FF.