Binary to Hex Converter
Type in either box — the other updates live, and the 4-bit grouping is shown so you can see exactly how the conversion happens.
How Binary to Hex Conversion Works
Binary and hexadecimal are both power-of-two number systems, and that is what makes converting between them the easiest conversion in computing. A single hex digit covers the values 0 to 15. Four binary digits — a nibble — also cover exactly 0 to 15. So every group of four bits maps to exactly one hex digit, and every hex digit maps back to exactly four bits. No division, no remainders, no calculator arithmetic: just grouping and swapping.
To convert by hand, start at the right-hand end of the binary number and split it into groups of four bits. If the leftmost group comes up short, add zeros to its left until it has four bits — leading zeros never change a number's value. Then read each group off the table below and write the hex digits in order.
The 4-Bit to Hex Table
| 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 |
Worked Example: 110101101011 in Hex
- Split into groups of four from the right: 1101 0110 1011.
- Convert each group: 1101 = D, 0110 = 6, 1011 = B.
- Write them in order: D6B. (In decimal that is 3,435 — the converter above shows it as a check.)
Programmers use hex as a compact shorthand for binary data: memory addresses, colour codes like #FF5733, MAC addresses and hex dumps are all binary wearing a shorter coat. A 32-bit value is 32 binary digits but only 8 hex digits. For conversions that involve decimal as well, the full Binary Converter shows binary, decimal, hex and octal side by side, and the companion pages on this shelf go the other two directions: decimal to binary and hex to decimal.
Frequently Asked Questions
How do you convert binary to hex?
Group the binary digits into sets of four, starting from the right, and replace each group with its hex digit: 0000 is 0, 0001 is 1, 0010 is 2, all the way to 1111 is F. If the last group on the left has fewer than four bits, pad it with leading zeros — they do not change the value. For example, 101010 is grouped as 0010 1010, which gives 2A.
Why does grouping binary in fours give hex?
Because one hex digit stands for exactly 16 values (0–15), and four binary digits also stand for exactly 16 values (0000–1111). The two systems line up perfectly, so conversion is a digit-by-digit swap with no arithmetic at all — unlike converting to decimal, nothing is multiplied or added.
What is 11111111 in hex?
11111111 in binary is FF in hex — and 255 in decimal. Split it into two groups of four: 1111 and 1111. Each group is the largest four-bit value, 15, which hex writes as F, so the answer is FF.
What is 1010 in hex?
1010 in binary is A in hex (10 in decimal). A single group of four bits converts directly: 1010 = 8 + 2 = 10, and hex uses the letter A for the value 10.
How do you convert hex back to binary?
Do the swap in reverse: replace every hex digit with its four-bit binary group, keeping all the zeros, including leading zeros inside the number. So 2A becomes 0010 1010, written as 101010 once the outer padding zeros are dropped, and FF becomes 11111111.
Does the converter handle very long binary numbers?
Yes. The conversion works on the digit groups themselves rather than on a floating-point number, so binary strings of any length convert exactly — there is no 53-bit precision limit to worry about, unlike a decimal detour.
Is this binary to hex converter free?
Yes. It is completely free with no signup required, and it runs entirely in your browser — the values you enter are never uploaded or stored.