Hex to Decimal Converter
Each hex digit is worth a power of 16: 2F = 2 × 16 + 15 = 47.
Updated
How the conversion works
Each hex digit is worth a power of 16, read right to left starting at 16⁰. For 2F: 2×16 + 15×1 (F = 15) = 47. Type 2F into the box and the tool returns Decimal: 47 using JavaScript's parseInt(hex, 16).
The # prefix
This field is built with CSS hex color codes in mind: a leading # is stripped automatically (hex.replace(/^#/, '')) before conversion, so #1A and 1A both convert to the same decimal value, 26. Anything outside 0-9 and A-F (case-insensitive) triggers "Invalid hex value. Use only 0-9 and A-F" rather than a wrong answer.
Reference values
| Hex | Decimal |
|---|---|
| A | 10 |
| 1A | 26 |
| 2F | 47 |
| FF | 255 |
| FFFFFF | 16777215 (white, in RGB hex) |