Hexadecimal to Binary Converter
Convert hexadecimal numbers (base 16) to binary (base 2) instantly. Enter a hexadecimal value to get its binary representation and a digit-by-digit explanation. This free online converter runs directly on the page without requiring an account.
Convert Hexadecimal to Binary
How to Convert Hexadecimal to Binary
Hexadecimal is a base-16 number system that uses the symbols 0 through 9 and A through F. Binary is a base-2 system that uses only 0 and 1. Because \(16 = 2^4\), each hexadecimal digit can be represented by exactly four binary bits.
- Write the hexadecimal number.
- Replace each hexadecimal digit with its four-bit binary equivalent.
- Join the binary groups in the original order.
Example: Convert 2F from hexadecimal to binary
F = 1111
2F₁₆ = 0010 1111₂
Therefore, hexadecimal 2F equals binary 00101111. If leading zeros are not needed, this can also be written as 101111.
Hexadecimal to Binary Conversion Table
Use this reference table to look up the four-bit binary equivalent of any single hexadecimal digit.
| Hexadecimal | Decimal | Binary | Hexadecimal | Decimal | Binary |
|---|---|---|---|---|---|
| 0 | 0 |
0000 |
8 | 8 |
1000 |
| 1 | 1 |
0001 |
9 | 9 |
1001 |
| 2 | 2 |
0010 |
A | 10 |
1010 |
| 3 | 3 |
0011 |
B | 11 |
1011 |
| 4 | 4 |
0100 |
C | 12 |
1100 |
| 5 | 5 |
0101 |
D | 13 |
1101 |
| 6 | 6 |
0110 |
E | 14 |
1110 |
| 7 | 7 |
0111 |
F | 15 |
1111 |
Frequently Asked Questions
How do I convert hexadecimal to binary?
Replace every hexadecimal digit with its four-bit binary equivalent, then concatenate the groups. For example, hexadecimal A3 becomes 10100011.
Why does each hexadecimal digit use four bits?
A hexadecimal digit has 16 possible values, from 0 to 15. Four binary bits represent 16 possible combinations because 2⁴ = 16.
Can I enter lowercase hexadecimal letters?
Yes. The converter accepts both uppercase and lowercase letters from A to F and converts them to uppercase for display.
Can I include a 0x prefix?
Yes. Inputs such as 0x2F and 2F are both accepted. Spaces between digits are also ignored.
Why are there leading zeros in the binary result?
Each hexadecimal digit is displayed as a full four-bit group. This preserves the correspondence between hexadecimal digits and binary bits. You can remove leading zeros when they are not needed for a particular application.
Does the converter support large hexadecimal numbers?
Yes. It converts hexadecimal strings directly, without first converting the entire value to a PHP integer. Inputs are limited to 4,096 hexadecimal digits per conversion.