Hex to Decimal Converter

How base 16 maps to base 10

Hexadecimal uses 16 symbols (0–9, then A–F for 10–15) where each digit position is worth a power of 16 instead of a power of 10. A single hex digit can represent values 0 through 15 that would otherwise need two decimal digits.

Worked example: 1A

Take 1A. The rightmost digit (A = 10) is worth 10 × 16⁰ = 10. The next digit (1) is worth 1 × 16¹ = 16. Add them: 16 + 10 = 26. Enter 1A or #1A into the field above and the tool returns exactly that, via JavaScript's parseInt(value, 16).

The "#" prefix

Hex values are frequently written with a leading #, particularly for CSS/web colors (e.g. #FF0000 for red). This tool strips a leading # automatically before validating and converting, so both 1A and #1A produce the same result.

Reference table

HexDecimal
A10
1016
1A26
FF255
100256

Valid input is restricted to 0–9 and A–F (case-insensitive) by the regex check the tool runs before conversion; anything else returns "Invalid hex value" instead of a silently wrong number.