Home › Converters › Binary to Hex
Binary to Hex
A register dump gives you a wall of ones and zeros, but the documentation, the debugger and everyone on your team talks in hex. This binary to hex converter translates instantly, shows the binary grouped in fours so you can follow the math yourself, and also converts octal and decimal in both directions — exactly, even for full 64-bit values.
| Binary (base 2) | 11111111 |
| Octal (base 8) | 377 |
| Decimal (base 10) | 255 |
| Hexadecimal (base 16) | FF |
Binary to hex conversion table
| Binary | Hexadecimal | Decimal |
|---|---|---|
| 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 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
How it works
Binary and hexadecimal fit together perfectly because 16 is 2 to the power of 4: every group of exactly four binary digits is worth one hex digit, from 0000 (0) to 1111 (15, written F). That is why the conversion needs no arithmetic at all — just grouping. Split the binary number into fours from the right, replace each group with its digit from the table above, and read off the answer; the final group can be padded with leading zeros, which never changes a value.
The Number box takes the value you type, the From list sets the base you are starting with, and the To list sets the base you want — binary and hexadecimal are pre-selected, and the result updates as you type. The sub-line shows the binary regrouped in fours so the match is visible, and the table under the result prints all four bases at once. Internally the converter uses exact integer arithmetic (BigInt), so a full 64-bit memory address converts digit-for-digit with no rounding, and the Swap bases button flips the two lists and converts back the other way.
Worked example
A junior developer in Austin is reading a byte out of a sensor manual, and the byte is written in binary: 11111111. She needs it in hex to compare with the value her code received.
Step 1: Write down the binary — 11111111.
Step 2: Group in fours from the right — 1111 | 1111.
Step 3: Map each group — 1111 = F, and 1111 = F.
Step 4: Read the result — FF.
Type 11111111 into the converter and it shows exactly that: FF, with the table underneath confirming the same byte is 377 in octal and 255 in decimal — the largest value one byte can hold, which is why full-white pixels and maxed-out volume registers are full of FFs. The reverse works the same way: hex A5 expands digit by digit to 1010 0101 in binary.
Common mistakes and errors
The classic mistake is grouping from the left instead of the right. For 1010111, grouping from the left gives 1010 | 111 — and reading the short group as 7 produces A7, which is wrong; grouping from the right gives 101 | 0111, padded to 0101 | 0111 = 57. Lengths that are not multiples of four are exactly where hand conversions go wrong, and exactly what the grouped display in the sub-line is for. The second trap is typing decimal-looking digits into the binary box: a stray 2 is not a binary digit, and this converter names the offending character instead of quietly guessing.
Hex letters cause the last family of errors: A through F are digits here, worth 10 through 15, and they are case-insensitive — ff and FF are the same number. What hex is not is signed: this converter handles non-negative integers, so a negative value or a fraction gets a plain-language message rather than a misleading two's-complement answer. For two's complement, convert the positive value, then apply your word size (8, 16, 32 or 64 bits) deliberately.
FAQ
How do you convert binary to hex?
Group the binary digits in fours from the right, then replace each group with its hex digit: 0000 = 0, 0001 = 1, up to 1111 = F. For example 11111111 splits into 1111 and 1111, which is F and F — so the hex value is FF. Padding the left with zeros to complete a group never changes the value.
What is 11111111 in hex?
11111111 in binary is FF in hexadecimal — and 255 in decimal. Each group of four 1s is worth 15, the hex digit F, so eight 1s give FF: one full byte, the largest value a single byte can hold.
What is 1010 in hex?
1010 in binary is A in hexadecimal, 10 in decimal. A single group of four bits converts to exactly one hex digit, and 1010 is worth 8 + 2 = 10, written A in hex — the first of the six letter digits A through F.
How do you convert hex back to binary?
Expand each hex digit into exactly four binary digits: A5 becomes 1010 0101, because A = 1010 and 5 = 0101. Set the From list to Hexadecimal (base 16) and the To list to Binary (base 2) in this converter and it does the expansion for you, digit for digit.
Why do programmers use hex instead of binary?
Because hex is binary in shorthand: each hex digit carries exactly four bits, so a byte is always two hex digits and a 64-bit address is always sixteen. FF is easier to read, type and compare than 11111111, with zero information lost — the two forms are the same number wearing different clothes.