Guide
Hexadecimal to decimal without losing digits
A hexadecimal number is a compact way to write a value, but sooner or later someone asks how big it actually is. Is that file offset a few kilobytes or a few gigabytes? Is the ID in the log the same as the one in the database? Converting to decimal answers those questions, and doing it exactly matters once the numbers get long.
The place-value sum
Hex positions are worth powers of 16: the rightmost is 1, then 16, 256, 4,096, 65,536 and so on. Each digit is multiplied by its position’s worth and the products are added. The digits A to F count as 10 to 15. For 2F the sum is 2 × 16 + 15, which is 47. The working on this page prints each such term, with the letter value in brackets, and finishes with the total.
Why exactness is a feature
Most calculators, spreadsheets and scripting languages hold numbers as 64-bit floating point. They are exact for whole numbers only up to 9,007,199,254,740,992, which is 2 to the power 53. A 64-bit identifier, a hash fragment or a large file offset can be above that limit, and the conversion then silently rounds the last digits. This page keeps the whole value as a big integer, so it is exact whatever the length. The test is easy to repeat: twenty F digits give 1,208,925,819,614,629,174,706,175, which is 2 to the 80th power minus one.
Options
A 0x prefix and mixed-case letters are fine; spaces and underscores are ignored, so you can paste a value grouped the way a debugger prints it. A minus sign is carried over to the answer. “Group digits” inserts separators into the decimal result so a 20-digit number can be read. Paste several values, one per line, and each gets its own result.
Edge cases
Hex has fractions too. A.8 is 10 plus 8/16, so 10.5. The digits after the point use negative powers of 16, and the working shows them as 8 × 16⁻¹ = 0.5. A character outside 0–9 and A–F is reported with its position, which catches a typical copy mistake like the letter O instead of zero. Leading zeros are accepted and have no effect.
The page reads values as unsigned. FF is 255, not −1; for signed interpretations choose a width in the two’s complement calculator.
A worked example
The Sample button loads 1F4A.8. The integer part contributes 1 × 4,096 = 4,096, F (15) × 256 = 3,840, 4 × 16 = 64 and A (10) × 1 = 10, which add up to 8,010. The fraction 8 × 16⁻¹ is 0.5. The total is 8010.5. The panel below shows the same number as 1111101001010.1 in binary and 17512.4 in octal, which you can use to check the figure from another direction.
Limits
This is a number converter. It does not treat the input as a string of bytes, a colour or a hash, and it does not apply endianness; if bytes arrive in network order and you need to flip them first, the endian converter does that. Extremely long inputs work, but their working lists get long, so turn the working off when you only need the result.
Related tools
- Decimal to Hex is the reverse conversion, with the remainders.
- Hex to Binary expands each digit into four bits.
- Hex to Octal converts between the two bases by way of binary.
- IEEE 754 Converter reads a hex pattern as a floating-point number.
Checked against the current version of the Hex to Decimal on .

