Hex to Decimal Converter
Enter a hexadecimal number to get its decimal value and the multiplication by powers of 16 that produces it.
How hex to decimal works
Hexadecimal is base 16. Each position is worth 16 times the position to its right, and the digits A–F stand for 10–15. To convert, multiply every digit by 16 raised to its position (rightmost is position 0) and add the products.
| Hex | Expansion | Decimal |
|---|---|---|
| FF | 15 × 16 + 15 × 1 | 255 |
| 7EA | 7 × 256 + 14 × 16 + 10 × 1 | 2,026 |
| 1F4 | 1 × 256 + 15 × 16 + 4 × 1 | 500 |
| DEADBEEF | sum of 8 digits × 16⁷ … 16⁰ | 3,735,928,559 |
Digit values
0–9 keep their usual value; A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Upper- and lowercase are equivalent, and prefixes such as 0x (C, JavaScript, Python) only label the base.
Values are converted with arbitrary-precision integers, so 64-bit and larger values such as 7FFFFFFFFFFFFFFF (9,223,372,036,854,775,807, the largest signed 64-bit integer) stay exact. To read a hex value as a signed two's complement number instead, use the signed binary converter after converting hex to binary.
Related guides
Other Number System Conversions
Related numeral systems converters for number conversion between binary, decimal, hexadecimal, octal, and ASCII text.