Hex to Binary Converter
Type a hex value to get its binary. Every hex digit turns into exactly four bits, shown digit by digit under the result.
Hex to binary
How to convert hex to binary
Replace each hex digit with its four bits and keep the zeros. For 2F, 2 is 0010 and F is 1111, so 2F is 00101111.
There is no carrying and no math across digits, which is why the conversion is instant both ways. The converter ignores a 0x prefix and converts each space-separated value on its own, so 0x1F and DE AD both work.
Hex digit to 4-bit binary
Look up each digit, left to right. Letters can be uppercase or lowercase.
| Hex | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
Where you meet hex
Hex is how binary data is usually written down for people. A few places you will see it:
- Web colors: #FF0000 is
11111111 00000000 00000000, full red. - Byte values in programming, like
0x41, the ASCII code for A. - MAC addresses, hashes and file dumps.
- To turn hex into a plain number, convert it here and then use the binary to decimal converter.
Frequently asked questions
What is FF in binary?
FF is `11111111`. Each F is `1111`, and together they make the largest byte value, 255.
How many bits is one hex digit?
Four bits. That is why two hex digits always make one byte.