How to convert hex to decimal by hand
Example 1: FF in hex is 255 in decimal
Hex to decimal: add up the place values
Each hex digit is worth its value times 16 raised to the power of its position, counting from 0 on the right.
| Digit | Place value | Digit × place value |
|---|---|---|
| F | 16¹ = 16 | 15 × 16 = 240 |
| F | 16⁰ = 1 | 15 × 1 = 15 |
240 + 15 = 255
Example 2: 1A3F in hex is 6719 in decimal
Hex to decimal: add up the place values
Each hex digit is worth its value times 16 raised to the power of its position, counting from 0 on the right.
| Digit | Place value | Digit × place value |
|---|---|---|
| 1 | 16³ = 4,096 | 1 × 4,096 = 4,096 |
| A | 16² = 256 | 10 × 256 = 2,560 |
| 3 | 16¹ = 16 | 3 × 16 = 48 |
| F | 16⁰ = 1 | 15 × 1 = 15 |
4,096 + 2,560 + 48 + 15 = 6,719
Hex to Decimal conversion table
| Hex | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
| 10 | 16 |
| 20 | 32 |
| 40 | 64 |
| 64 | 100 |
| 80 | 128 |
| FF | 255 |
| 100 | 256 |
| 200 | 512 |
| 3E8 | 1000 |
| 400 | 1024 |
Where this conversion comes up
- CSS and design colours: in #FF8800 the red channel FF is 255, green 88 is 136 and blue 00 is 0.
- Unicode code points: U+00E9 (é) is 233 in decimal, which is also its HTML entity é.
- Error codes and memory addresses from logs and debuggers, which are usually printed in hex.
Frequently asked questions
Is hex case sensitive?
No. A to F and a to f mean the same values, 10 to 15. This converter accepts either and shows results in upper case.
Can I paste a colour code like #FF8800?
Yes. The # is ignored and the whole code is converted as one number (16746496). To get each channel, convert the pairs FF, 88 and 00 separately.
Can I convert negative numbers?
Yes. Put a minus sign in front and it is kept in the result, for example -FF becomes -255. The converter does not produce two's complement.
Is there a limit on how big the number can be?
No practical limit. The conversion uses arbitrary precision integers, so long values stay exact. The step-by-step working is shown for numbers up to 24 digits.
Can I convert fractions?
Not with this tool. It converts whole hex numbers to whole decimal numbers.