Hex to decimal
Turn hex into decimal, with binary and octal too. Huge and signed values work.
Result
Settings
Result
Settings
Result
Settings
Result
Recent
To change hex into decimal, multiply each digit by a power of 16 and add up the products. Paste a value such as FF or 0x1A3F and the decimal number appears at once, with binary and octal next to it. It is free and needs no account.
How to do it by hand
- Number the places from the right, starting at 0.
- Replace letters with their values: A is 10, B 11, C 12, D 13, E 14 and F 15.
- Multiply each digit by 16 raised to its place number.
- Add the products together. The total is the decimal value.
Worked examples
2F
2×16 + 15×1 = 32 + 15
47
1A3
1×256 + 10×16 + 3×1 = 256 + 160 + 3
419
7D0
7×256 + 13×16 + 0×1 = 1792 + 208
2000
Common mistakes
- Reading hex digits as if they were decimal. 10 in hex is sixteen.
- Counting the powers from the left end. The rightmost digit is always 16 to the power 0.
- Ignoring the sign. FF is 255 unsigned, but as a signed 8-bit number it is -1.
Powers of 16 (place values)
| Place (from the right) | Power | Decimal value |
|---|---|---|
| 0 | 16^0 | 1 |
| 1 | 16^1 | 16 |
| 2 | 16^2 | 256 |
| 3 | 16^3 | 4,096 |
| 4 | 16^4 | 65,536 |
| 5 | 16^5 | 1,048,576 |
| 6 | 16^6 | 16,777,216 |
| 7 | 16^7 | 268,435,456 |
| 8 | 16^8 | 4,294,967,296 |
Questions people ask
Does a 0x in front change the value?
No. 0x just marks the number as hex, so 0x1F and 1F are both 31.
Can I type lower case letters?
Yes. ff, Ff and FF are the same value. You can also pick upper or lower case for the output.
Will it work on more than 16 hex digits?
Yes. Values past 64 bits are worked out exactly, and the box takes up to 10,000 characters.