How to use the Hex to Binary Converter
Type a hex number using the digits 0 to 9 and the letters A to F. The binary result is split into four-bit groups.
How to convert hex to binary
Replace each hex digit with its four-bit pattern: 0 is 0000, 9 is 1001, A is 1010 and F is 1111. Write the groups in the same order. A5F becomes 1010 0101 1111. Leading zeros in the first group can be dropped when you do not need a fixed width.
Common uses
Reading individual bits in a register value, checking flags in a status byte, decoding colour channels from a hex colour and working with subnet masks written in hex all start with this conversion.
How it works
Each hex digit maps to four bits.
Examples
- A5F
1010 0101 1111
- FF
1111 1111
- 1C
0001 1100
Hex to binary table
| Hex | Binary |
|---|---|
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| A | 1010 |
| B | 1011 |
| C | 1100 |
| D | 1101 |
| E | 1110 |
| F | 1111 |
| 10 | 0001 0000 |
| 1F | 0001 1111 |
| 7F | 0111 1111 |
| 80 | 1000 0000 |
| FF | 1111 1111 |
Limitations and assumptions
Runs entirely in your browser. Nothing you enter is uploaded.
Frequently asked questions
How do I convert hex to binary?
Swap each hex digit for its four-bit group and keep the order. 2F becomes 0010 1111, usually written 10 1111 without the leading zeros.
What is FF in binary?
1111 1111, the eight bits of one full byte.
Why does each hex digit become four bits?
Sixteen is 2⁴, so the sixteen hex digits 0 to F match the sixteen possible four-bit patterns one for one.
How do I convert binary back to hex?
Use the binary to hex converter, which groups the bits in fours from the right.