Hex to decimal converter

Type a number in either field and the other converts as you type — hex to decimal or decimal to hex. The breakdown below shows the actual math for your number, not a canned example. Prefixes like 0x, spaces and underscores are fine.

Step by step

Type a number above to see the conversion worked out step by step.

How hex to decimal conversion works

Hexadecimal is base 16: each digit position is worth a power of 16, and the letters A–F stand for the values 10–15. To convert to decimal, multiply each digit by its positional value and add everything up:

1A3₁₆ = 1×16² + A(10)×16¹ + 3×16⁰ = 256 + 160 + 3 = 419₁₀

Going the other way — decimal to hex — divide repeatedly by 16 and read the remainders from bottom to top. The converter above shows both directions on whatever number you give it.

Hex digit reference

Hexadecimal digits and their decimal and binary values
HexDecimalBinary
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111

Where you'll meet hex numbers

Memory addresses (0x7FFF5FBFF8C0), color codes (#FFA700), byte dumps, permission masks, MAC addresses, error codes — hexadecimal shows up anywhere data is described byte by byte, because two hex digits are exactly one byte.

Related tools and guides