How to convert decimal to hex
Divide by 16 repeatedly and write down the remainders. Reading them from bottom to top gives the answer. For 755:
755 ÷ 16 = 47 remainder 3 47 ÷ 16 = 2 remainder F 2 ÷ 16 = 0 remainder 2
Remainders bottom to top: 2F3.
Decimal to hex table
| Decimal | Hex |
|---|---|
0 | 0 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
10 | A |
11 | B |
12 | C |
13 | D |
14 | E |
15 | F |
16 | 10 |
32 | 20 |
64 | 40 |
100 | 64 |
127 | 7F |
128 | 80 |
255 | FF |
256 | 100 |
1024 | 400 |
4096 | 1000 |
65535 | 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