Hex to binary
Expand each hex digit into four bits. Long values like hashes work too.
Result
Settings
Result
Settings
Result
Settings
Result
Recent
Each hex digit stands for exactly four bits, so hex to binary is a straight swap done one digit at a time. Paste something like 3C or 0xDEADBEEF and the bits come out in groups of four, with the decimal value beside them. Free to use, no account needed.
How to do it by hand
- Take the hex digits one at a time.
- Write each one as four bits: 0 is 0000, 9 is 1001, A is 1010, F is 1111.
- Keep every group at four bits, even when it starts with zeros.
- Join the groups in order. Zeros at the very front can be dropped.
Worked examples
3C
3 = 0011, C = 1100
0011 1100
A7
A = 1010, 7 = 0111
1010 0111
1F4
1 = 0001, F = 1111, 4 = 0100
0001 1111 0100
Common mistakes
- Writing a middle 7 as 111. Inside a value it must be 0111, or every bit after it slides over.
- Dividing the whole number by 2 over and over. It gives the same answer but takes far longer than the four-bit swap.
- Mixing up B (1011) and D (1101), which are easy to swap when writing fast.
One hex digit = four binary digits
| Hex | Binary (4 bits) | 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 |
Questions people ask
Why do hex and binary line up so neatly?
Because 16 is 2 to the 4th. One hex digit covers every pattern that four bits can make.
Can I convert a 256-bit hash?
Yes. 64 hex digits become exactly 256 bits, and input up to 10,000 characters is accepted.
Can the bits be spaced in groups of eight?
Yes. Choose 8-digit spacing in the options to see whole bytes.