Hex to Decimal Converter

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

HexDecimal
A10
1A26
2F47
FF255
FFFFFF16777215 (white, in RGB hex)