Tools
Log in
English

All converters

Hex to decimal

Turn hex into decimal, with binary and octal too. Huge and signed values work.

Result

Decimal
Hex
Binary
Octal

Settings

To change hex into decimal, multiply each digit by a power of 16 and add up the products. Paste a value such as FF or 0x1A3F and the decimal number appears at once, with binary and octal next to it. It is free and needs no account.

How to do it by hand

  1. Number the places from the right, starting at 0.
  2. Replace letters with their values: A is 10, B 11, C 12, D 13, E 14 and F 15.
  3. Multiply each digit by 16 raised to its place number.
  4. Add the products together. The total is the decimal value.

Worked examples

2F

2×16 + 15×1 = 32 + 15

47

1A3

1×256 + 10×16 + 3×1 = 256 + 160 + 3

419

7D0

7×256 + 13×16 + 0×1 = 1792 + 208

2000

Common mistakes

  • Reading hex digits as if they were decimal. 10 in hex is sixteen.
  • Counting the powers from the left end. The rightmost digit is always 16 to the power 0.
  • Ignoring the sign. FF is 255 unsigned, but as a signed 8-bit number it is -1.

Powers of 16 (place values)

Place (from the right)PowerDecimal value
016^01
116^116
216^2256
316^34,096
416^465,536
516^51,048,576
616^616,777,216
716^7268,435,456
816^84,294,967,296

Questions people ask

Does a 0x in front change the value?

No. 0x just marks the number as hex, so 0x1F and 1F are both 31.

Can I type lower case letters?

Yes. ff, Ff and FF are the same value. You can also pick upper or lower case for the output.

Will it work on more than 16 hex digits?

Yes. Values past 64 bits are worked out exactly, and the box takes up to 10,000 characters.