Home › Unit Converters › Binary to Hex Converter
Binary to Hex Converter
Convert binary to hexadecimal with this free binary to hex converter. Hex is how programmers, colour codes and memory addresses squeeze long binary numbers into a short, readable form — every hex digit stands for exactly four binary digits. Type a binary number and see its hex value at once, with the four-bit groups (nibbles) shown so you can follow the working. It also converts the other way, hex to binary, and shows the decimal value of both.
How to use this converter
Step 1: Type or paste the binary number into the box — 11111111 is filled in as an example. Spaces between groups are fine.
Step 2: Check the From list says Binary and the To list says Hexadecimal.
Step 3: Read the hex result in the big line. The line below shows each group of four bits and the hex digit it makes, and the last line gives the decimal value.
Step 4: To convert hex back to binary, press Swap and type the hex number instead.
Common amounts
| Binary (4 bits) | Decimal | Hex |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |
How it works
Binary is base 2: every digit is a 0 or a 1, and each place is worth twice the one before it. Hexadecimal is base 16: it uses the digits 0 to 9 and then the letters A to F for the values 10 to 15. Because 16 is exactly 2 × 2 × 2 × 2, one hex digit always matches exactly four binary digits — that group of four bits is called a nibble.
So converting binary to hex needs no arithmetic at all. Split the binary number into groups of four starting from the right, adding zeros on the left if the last group is short. Then replace each group with its hex digit from the table below: 0000 is 0, 0101 is 5, 1010 is A, and 1111 is F.
Going back is just as direct: write each hex digit as four bits and join them together. That is why FF becomes 11111111 — F is 1111, twice. This converter uses exact integer maths, so even very long numbers (up to 256 bits) convert with no rounding.
Worked example
Convert the binary number 10101100 to hex.
Step 1: Write down the binary number — 10101100.
Step 2: Split it into groups of four from the right: 1010 and 1100.
Step 3: Replace each group using the table: 1010 = A and 1100 = C.
Step 4: Join the digits — AC.
So 10101100 in binary is AC in hex, which is 172 in decimal — the converter shows the same answer, and AC back-converts to 10101100.
FAQ
What is 11111111 in hex?
11111111 in binary is FF in hex. Split it into two groups of four — 1111 and 1111 — and each 1111 is F, the largest hex digit. Its decimal value is 255.
How do you convert binary to hex by hand?
Group the binary digits into fours starting from the right, adding zeros at the left end if needed. Then swap each group for one hex digit: 1010 becomes A, 1100 becomes C, and so on. No multiplication is needed.
What is FF in binary?
FF in hex is 11111111 in binary. Each F stands for 1111, so two Fs give eight 1 bits in a row. FF is 255 in decimal, the biggest value one byte can hold.
Why are binary numbers grouped in fours for hex?
Because one hex digit has 16 possible values, and four bits also have exactly 16 combinations (2 × 2 × 2 × 2). The two always line up perfectly, which is why hex is used as a short way to write binary.
Can I convert hex back to binary with this tool?
Yes. Press the Swap button, or set From to Hexadecimal and To to Binary, then type the hex value. Each hex digit is expanded into its four bits, and the decimal value is shown as well.
What is 1010 in hex?
1010 in binary is A in hex, which is 10 in decimal. It is a single group of four bits, so it becomes a single hex digit.