How to convert binary to hex
Each hex digit is exactly 4 binary digits, so you can convert digit by digit (group the binary digits in fours from the right):
2 → 0010 F → 1111 3 → 0011
So 1011110011 in binary is 2F3 in hex.
Binary to hex table
| Binary | Hex |
|---|---|
0 | 0 |
1 | 1 |
10 | 2 |
11 | 3 |
100 | 4 |
101 | 5 |
110 | 6 |
111 | 7 |
1000 | 8 |
1001 | 9 |
1010 | A |
1011 | B |
1100 | C |
1101 | D |
1110 | E |
1111 | F |
10000 | 10 |
100000 | 20 |
1000000 | 40 |
1100100 | 64 |
1111111 | 7F |
10000000 | 80 |
11111111 | FF |
100000000 | 100 |
10000000000 | 400 |
1000000000000 | 1000 |
1111111111111111 | FFFF |
FAQ
How are negative numbers converted?
Without a bit width, the sign is kept: −255 becomes −FF. Choose a bit width and turn on Signed to use two's complement, the way computers store negative numbers: −1 in 8 bits is FF.
Is there a size limit?
No practical one. Arbitrary-precision integers (BigInt) convert even 100-digit numbers exactly. Fractions aren't supported.
Can I paste 0x, 0b or 0o prefixes, spaces or underscores?
Yes. Prefixes are recognized, and spaces or underscores between digits (like 1111_0000) are ignored. Put several numbers on separate lines to convert them all at once.
Is my data uploaded?
No. Everything is converted in your browser. Privacy