Hex to Decimal Converter

Share converter:
Embed this tool:

Type a hexadecimal number and its decimal value appears as you type. The guide below shows how to do the same sum by hand using powers of 16.

How hexadecimal maps to decimal

Hexadecimal is a base-16 system. Its digits are 0 to 9 followed by a to f, where a is 10, b is 11, c is 12, d is 13, e is 14 and f is 15. Each position is worth a power of 16, starting with 1 on the right and then 16, 256, 4096, 65536 and so on.

decimal = dₙ × 16ⁿ + … + d₂ × 16² + d₁ × 16¹ + d₀ × 16⁰Each digit d runs from 0 to 15. Position 0 is the rightmost digit.

How to convert hex to decimal

  1. Turn every letter into its number: a = 10 up to f = 15.
  2. Number the digits from the right, starting at position 0.
  3. Multiply each digit by 16 raised to its position.
  4. Add all the products.

Example: convert 2f3. The digits are 2, 15 and 3, so the sum is 2 × 256 + 15 × 16 + 3 = 512 + 240 + 3 = 755.

Example with four digits: convert 1a3f. That is 1 × 4096 + 10 × 256 + 3 × 16 + 15 = 4096 + 2560 + 48 + 15 = 6719.

A familiar one: beef is 11 × 4096 + 14 × 256 + 14 × 16 + 15 = 45056 + 3584 + 224 + 15 = 48879.

What the converter accepts

  • Digits 0 to 9 and letters a to f, in upper or lower case.
  • No prefix, sign or point. An empty box, a 0x prefix, a minus sign, a dot or any other letter makes the answer box show NaN. Because e is a hex digit, 1e3 is read as the hex number 1e3, which is 483, and not as 1000.
  • Exact up to 13 hex digits. The value is held as a double-precision number with 53 significant bits. Larger inputs are rounded, so 7fffffffffffffff, whose true value is 9223372036854775807, shows as 9223372036854776000.
  • Very large results above 1e21 switch to exponent form, for example 7.555786372591432e+22.

Hex to decimal conversion table

Common values
HexDecimal
00
99
a10
b11
c12
d13
e14
f15
1016
1f31
2032
4064
64100
80128
a0160
ff255
100256
3e81000
fff4095
ffff65535
Place values in hex
PositionWorth
01
116
2256
34096
465536
51048576

The reverse direction is covered by the decimal to hex converter. To see the bits behind a hex value, use the hex to binary converter, and to add or multiply hex numbers without converting first, try the hexadecimal calculator.

Frequently asked questions

How do I convert ff to decimal?

f is 15, so ff is 15 × 16 + 15 = 255. That is the largest value a single byte can hold.

What is hex 10 in decimal?

It is 16. The digit 1 sits in the sixteens position and the 0 adds nothing, so hex 10 is 1 × 16 + 0 = 16, not ten.

Why does my result show NaN?

The input is not a plain run of hex digits. Remove a 0x prefix, minus sign, spaces inside the number or any letter beyond f, and make sure the box is not empty.

Are uppercase and lowercase letters treated the same?

Yes. A and a both mean 10, so DEADBEEF and deadbeef both give 3735928559.

References

  1. Donald E. Knuth, The Art of Computer Programming, Volume 2: Seminumerical Algorithms, section 4.1 (Positional Number Systems)

Cite this converter and page

If you use this page in your work, you can cite it as:

Reeliy Editorial Team. (2026). Hex to Decimal Converter. Reeliy. https://reeliy.com/converters/convert-hex-to-decimal“Hex to Decimal Converter.” Reeliy, 2026, https://reeliy.com/converters/convert-hex-to-decimal.