Convert Hexadecimal to Decimal
Convert a hexadecimal number to decimal.
Your data is never sent to any server.
The hexadecimal to decimal converter turns a base 16 value into the decimal number it represents. It accepts upper and lower case and flags any character that does not belong to the base.
How the calculation works
Each position is worth sixteen times the one to its right. Taking 1A3:
| Digit | 1 | A | 3 |
|---|---|---|---|
| Position | 16² | 16¹ | 16⁰ |
| Value | 256 | 160 | 3 |
Adding up: 256 + 160 + 3 = 419. The letter A contributes 10 × 16 = 160, because A is worth 10 in hexadecimal.
Equivalences you meet often
| Hex | Decimal | Where you run into it |
|---|---|---|
0A | 10 | Line feed in a byte dump |
20 | 32 | The space character in ASCII |
7F | 127 | The last character of original ASCII |
FF | 255 | Full byte, color channel at maximum |
FFFF | 65535 | Maximum of unsigned 16 bits |
Need the other direction? Go to decimal to hex.
How to use Hex to Decimal
- 1
Type the hexadecimal value
Enter the base 16 number using digits 0 to 9 and letters A to F. Upper or lower case makes no difference.
- 2
Read the decimal number
The base 10 equivalent appears highlighted instantly, as you type.
- 3
Check for invalid characters
If a letter outside the A–F range slips in, it is flagged next to the input with the exact offender.
- 4
Copy the result
Every row has its own copy button, including the binary and octal conversions shown below.
Frequently asked questions
How do you convert hexadecimal to decimal by hand?
Multiply each digit by the power of 16 matching its position and add them up. So FF is 15×16 + 15 = 255, and 1A is 1×16 + 10 = 26.
Do I need to type the 0x prefix?
No, but if you paste it with one, it is ignored. The hash used for colors (#) does have to go.
What are the letters worth?
A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15. They are the six symbols base 16 needs beyond the decimal digits.
What is FF in decimal?
255. It is the maximum value of a byte, which is why color channels run from 00 to FF in hexadecimal and from 0 to 255 in decimal.
Can I use it to convert a hex color?
One component at a time: split the color into pairs (RR, GG, BB) and convert each. For the full color with a preview, a dedicated color converter is more convenient.