Hex to binary converter
Type a hex number and see its bits: FF is 11111111 and 3E8 is 1111101000. Each hex digit turns into four bits, and "Show the working" lays out that mapping digit by digit. Pad to 8 bits, split into nibbles or add a 0b prefix from the Output menu.
Show the working
Runs in your browser. Nothing you type is uploaded.
How to use the converter
- Type or paste hex values. Upper and lower case both work, and
0x,#or a trailinghare accepted. - Choose plain binary, 8-bit padding, 4-bit groups, 8-bit groups or a
0bprefix. - Copy, download or share the output.
Width and Signed. Pick a Width to pad the binary to 8, 16, 32 or 64 bits, so 3E8 at 16 bits becomes 0000001111101000. Tick Signed to read the hex as two's complement; the bits stay the same, and the decimal value under the boxes turns negative when the top bit is 1. Octal is shown there too. Open file loads a .txt or .csv list of hex values.
How to convert hex to binary
Write each hex digit as its 4-bit pattern and join the patterns up. Every digit gets all four bits, including zeros, with one exception: zeros at the very front of the result can be dropped because they do not change the value.

For 3E8: 3 is 0011, E is 1110 and 8 is 1000. Joined, that is 001111101000, or 1111101000 without the leading zeros, which is 1000 in decimal. For 2F: 2 is 0010 and F is 1111, giving 101111.
The mistake to watch for is dropping zeros from a digit in the middle or at the end. If you write the 0 in A0 as a single 0 instead of 0000, you get 10100 (20) instead of 10100000 (160).
Hex to binary chart

| Hex | Binary | Hex | Binary |
|---|---|---|---|
| 0 | 0000 | 8 | 1000 |
| 1 | 0001 | 9 | 1001 |
| 2 | 0010 | A | 1010 |
| 3 | 0011 | B | 1011 |
| 4 | 0100 | C | 1100 |
| 5 | 0101 | D | 1101 |
| 6 | 0110 | E | 1110 |
| 7 | 0111 | F | 1111 |
A quick way to rebuild any row: the four bits are worth 8, 4, 2 and 1. B is 11, and 11 = 8 + 2 + 1, so B is 1011. If you know A is 10 and F is 15, the letters in between follow in order.
Worked examples
| Hex | Digit by digit | Binary | Decimal |
|---|---|---|---|
1F | 0001 1111 | 11111 | 31 |
2F | 0010 1111 | 101111 | 47 |
7F | 0111 1111 | 1111111 | 127 |
A0 | 1010 0000 | 10100000 | 160 |
F0 | 1111 0000 | 11110000 | 240 |
FF | 1111 1111 | 11111111 | 255 |
2ED | 0010 1110 1101 | 1011101101 | 749 |
3E8 | 0011 1110 1000 | 1111101000 | 1000 |
DEADBEEF | 1101 1110 1010 1101 1011 1110 1110 1111 | 32 bits | 3735928559 |
Where you meet hex to binary
Bit masks are usually written in hex. 0xF0 is 11110000, so ANDing a byte with it keeps the top four bits and clears the bottom four. Seeing the mask in binary makes it obvious which bits it touches. The Wikipedia article on masks has more examples, and the binary calculator runs AND, OR and XOR for you.
Color codes are another everyday case. In the six-digit CSS hex color format, a color is three bytes, one each for red, green and blue.

Type FF8800 and choose "8-bit groups" in the Output menu to get that split in one step. Memory dumps and debuggers work the same way: 0xDEADBEEF, a value programmers often use to mark uninitialised memory, expands to the 32 bits shown in the table above.
Hex that holds text
If your hex is a run of byte values like 48 65 6C 6C 6F, it is probably text. This page treats each group as a number, so 48 69 becomes 1001000 and 1101001. To read the bytes as characters, use hex to text, which turns 48 69 into "Hi".
Hex to binary in code
Python: bin(int('3E8', 16)) returns '0b1111101000', and format(int('3E8', 16), '012b') keeps all twelve bits. JavaScript: parseInt('3E8', 16).toString(2) returns "1111101000"; for long values use BigInt('0x' + hex).toString(2).
To go back from bits to hex, use binary to hex. For the decimal value, try hex to decimal.
Frequently asked questions
What is F in binary?
1111, the largest 4-bit value (15).
What is 0110 in hex?
6. The bits worth 4 and 2 are on, and 4 + 2 = 6, which is the same digit in hex and decimal.
What is 7F in binary?
01111111, or 127 in decimal. It is the largest value a signed 8-bit number can hold.
How many bits is one hex digit?
Four. Two hex digits make one byte of 8 bits, so a 32-bit value is 8 hex digits long.
Can I convert very long hex values?
Yes. A 64-character SHA-256 hash converts exactly. "Pad to 8 bits" adds zeros at the front so the output is a whole number of bytes.
Is my input sent anywhere?
No. Everything runs in your browser.

