Hex to decimal converter
Paste a hex value from code, a log or a color to see its decimal value with the working.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter hexadecimal number.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Multiply each digit by 16 raised to its position and add the results: power 0 for the rightmost whole digit, rising by 1 to the left, and -1, -2 after the point. Example: 2F = 2×16 + 15×1 = 47 (A = 10 up to F = 15).
Example
Inputs: Hexadecimal number = FF. Result: Result in decimal: 255.
FF
255
Limits and caveats
- Negative numbers keep a minus sign in front of the magnitude; they are not shown in two's complement.
- Up to 2000 digits before the point and 200 after it.
Questions about this tool
What are the letters A to F worth?
A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
How do I convert 2F to decimal?
2 × 16 + 15 × 1 = 32 + 15 = 47.
Is it case sensitive?
No. ff and FF are both 255, and the 0x prefix is optional.
