Enter a value below — binary and octal come along free
Type in any field — the others update as you type.
| Hex | Decimal | Hex | Decimal |
|---|---|---|---|
| 0 | 0 | ||
| 1 | 1 | ||
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | 9 | ||
| A | 10 | ||
| B | 11 | ||
| C | 12 |
A hexadecimal number is read right to left, and each digit is worth 16 times more than the digit to its right. To convert to decimal, multiply each digit by its place value and add the results:
The letters A–F stand for the values 10–15 — hexadecimal needs sixteen distinct digits, and the alphabet supplies the six that 0–9 cannot.
Convert 1A3 to decimal:
So 1A3 in hex is 419 in decimal. The same method works for any length — a fourth digit is multiplied by 4096, a fifth by 65,536.
You will meet hexadecimal any time software shows you raw values, because one hex digit is exactly four bits and two hex digits are exactly one byte:
FF in hexadecimal is 255 in decimal: F stands for 15, so FF is 15 × 16 + 15 = 255. It is the largest value one byte can hold, which is why 255 appears as a limit throughout computing.
Multiply each hex digit by its place value — 1 for the rightmost digit, 16 for the next, then 256, then 4096 — and add the results. The letters A through F count as 10 through 15.
No. The 0x prefix only marks the number as hexadecimal; it has no value itself. 0x1A3 and 1A3 are the same number, and this converter accepts both.
No — 1a3 and 1A3 are exactly the same value. Uppercase is the usual display convention, and this converter shows results in uppercase.
Going the other way? Use the Decimal to Hex Converter.