Free · No signup · Runs in your browser
Hex to Binary Converter
Enter a hexadecimal number and get its binary form. Each hex digit expands to exactly four bits.
This tool needs JavaScript. Please enable it in your browser to use it.
- Instant results as you type
- Step-by-step working
- Private: input stays in your browser
- Free, no signup
To convert hexadecimal to binary, replace each hex digit with its 4-bit binary value. For example, A is 1010 and 5 is 0101, so A5 is 1010 0101.
How to use the hex to binary converter
- Enter a hex value such as
FF,1F4or0xDEADBEEF. - Read the binary result, grouped in nibbles for readability.
- Open Show the steps to see each digit expanded.
Examples
| Hex | Binary |
|---|---|
| F | 1111 |
| FF | 1111 1111 |
| A5 | 1010 0101 |
| 1F4 | 0001 1111 0100 |
| DEADBEEF | 1101 1110 1010 1101 1011 1110 1110 1111 |
Hex digit to binary lookup
| 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 |
Example: 3C7
3 is 0011, C is 1100 and 7 is 0111, so 3C7 is 0011 1100 0111. Leading zeros can be dropped when the value stands alone: 1111000111.
Uses
- Reading memory dumps and register values.
- Working out bit masks and flags.
- Understanding color values: #FF8800 is 11111111 10001000 00000000 in binary.
To go back, use the binary to hex converter.
Hexadecimal explained
Hexadecimal (base 16) uses the digits 0 to 9 and the letters A to F, where A is 10 and F is 15. Because 16 is 2 to the fourth power, every hex digit corresponds to exactly four bits. That is why programmers write bytes as two hex digits: FF is 11111111, and 0A is 00001010.
Worked examples
| Hex | Working | Binary |
|---|---|---|
| 2F | 2 = 0010, F = 1111 | 00101111 |
| B4 | B = 1011, 4 = 0100 | 10110100 |
| 7E3 | 7 = 0111, E = 1110, 3 = 0011 | 011111100011 |
| 0xFF | F = 1111, F = 1111 | 11111111 |
Hex colors in binary
A web color such as #2563EB is three bytes: 25 (red), 63 (green) and EB (blue). In binary that is 00100101, 01100011 and 11101011. Each channel runs from 0 to 255.
Hex to decimal
Convert to binary first, then use binary to decimal. For example, A5 is 10100101, which is 165.
Hex to binary converter FAQ
Is hex case sensitive?
No. a and A both mean 10.
What is FF in binary?
FF is 11111111.
What is 0xA in binary?
0xA is 1010.
Can the tool take a 0x prefix?
Yes, 0x and # prefixes are removed automatically.
What if I enter a letter beyond F?
Hex only uses 0-9 and A-F. The tool names the first invalid character.
