How to convert hex to decimal
- Paste your hex numbers into Input, one per line. The 0x prefix is optional and case doesn’t matter.
- Each one converts to decimal as you type.
- Copy the decimal numbers. Lines with characters outside 0 to 9 and A to F are flagged.
Converting hex to decimal by hand
Each hex place is worth 16 times the place to its right: 1, 16, 256, 4096 and so on. Swap any letters for their values (A is 10 up to F is 15), multiply each digit by its place value, and add the results. For 2AF3:
| Digit | 2 | A (10) | F (15) | 3 |
|---|---|---|---|---|
| Place value | 4096 | 256 | 16 | 1 |
| Product | 8192 | 2560 | 240 | 3 |
8192 + 2560 + 240 + 3 = 10995. Two-digit values are quicker: 7F is 7 × 16 + 15 = 127.
Hex digits and their decimal values
| Hex | Decimal | Hex | Decimal |
|---|---|---|---|
| 0 | 0 | 8 | 8 |
| 1 | 1 | 9 | 9 |
| 2 | 2 | A | 10 |
| 3 | 3 | B | 11 |
| 4 | 4 | C | 12 |
| 5 | 5 | D | 13 |
| 6 | 6 | E | 14 |
| 7 | 7 | F | 15 |
After F the count carries: 10 is 16, 20 is 32, 100 is 256 and 1000 is 4096. Hex values in code, logs and memory addresses are often padded with leading zeros, like 0x000001F4. The zeros don’t change the value, so that’s still 500.