Developer · Converter
Hex to decimal converter.
Convert a hexadecimal number to decimal. FF is 255 and 7FFFFFFF is 2147483647. Any length, exact, with 0x or # prefixes accepted.
Input
Result
Enter a value to convert it.
How to hex to decimal by hand
Each hex digit is worth 16 to the power of its position from the right, with A to F standing for 10 to 15. For 1A3F: 1×4096 + 10×256 + 3×16 + 15 = 6719.
The maths uses exact big integers, so long values like a 64-bit or 256-bit number are not rounded. Spaces, commas and underscores are ignored, and a leading minus sign just flips the sign of the result (this is not a two’s complement reader, so FFFFFFFF is 4294967295, not −1). Whole numbers only.
Worked examples
| Hex | Decimal |
|---|---|
FF | 255 |
0x1A3F | 6719 |
7FFFFFFF | 2147483647 |
FFFFFFFF | 4294967295 |
FFFFFFFFFFFFFFFF | 18446744073709551615 |
Need several formats side by side? Use the binary converter, which shows text, binary, hex and decimal together, or look a character up in the ASCII table. For Base64 text, see the Base64 encoder and decoder.
Sources: RFC 4648 section 8, Base 16 encoding. Retrieved October 2026.
Hex to decimal FAQ
How do I convert hex to decimal?
Multiply each digit by 16 raised to its position (counted from 0 on the right) and add. A is 10, B is 11 and so on up to F, which is 15. FF is 15×16 + 15 = 255.
What is FF in decimal?
255, the largest value one byte can hold.
Does it handle very large hex numbers?
Yes. It uses arbitrary-precision integers, so 64-bit values and longer convert exactly. Nothing is rounded.
What about negative numbers and two’s complement?
A leading minus gives a negative result, but hex digits are read as an unsigned magnitude. FFFFFFFF is 4294967295 here. To read it as a signed 32-bit value, use a two’s complement calculator.
Does it convert text?
No, this is for numbers. To decode hex bytes to words use the hex to text converter.