DevSwitch.net
Back to Tools
#

Hexadecimal to Decimal Converter

Convert hexadecimal numbers to decimal format

Number Converters

Tip: Enter a hexadecimal number (0-9, A-F). The conversion happens in real-time.

Runs in your browser

Hex Decimal

Decimal base 10
-
Try

Convert hex to decimal

Type a hex number and its decimal value appears as you type. A 0x prefix and lowercase letters are fine, results longer than four digits are also shown with commas between the thousands, and the window bar shows how many bits the number takes.

Results are exact at any length: FFFFFFFFFFFFFFFF, the largest unsigned 64-bit value, gives 18446744073709551615. Tools that use plain JavaScript numbers start losing the last digits above 1FFFFFFFFFFFFF, which is 9007199254740991.

How to convert hexadecimal to decimal by hand

Number the digits from the right, starting at 0. Multiply each digit by 16 to the power of its position, counting A to F as 10 to 15, then add the results. For 7E3:

DigitPlace valueAdds
7 16² = 256 1792
E = 14 16¹ = 16 224
3 16⁰ = 1 3

Add the last column: 1792 + 224 + 3 = 2019, so 7E3 is 2019 in decimal. The step-by-step window above lists the same products for the hex number you type, up to 40 digits.

Hex to decimal table

HexDecimal
A 10
F 15
10 16
1F 31
20 32
40 64
64 100
7F 127
80 128
FF 255
100 256
400 1024
1000 4096
FFFF 65535

Each hex place is worth sixteen times the one to its right: 10 is 16, 100 is 256 and 1000 is 4096. A color code is three such pairs, so in #FF8800 the red is 255, the green 136 and the blue 0; the hex to RGB converter splits a whole color code for you.

Need hex from a decimal number?

The decimal to hex converter divides by 16 and turns each remainder into a hex digit.

Signed and prefixed hex values

Read the same way

  • 0x1A4, 1a4 and 1A4 all give 420
  • -FF gives -255: the minus sign stays a sign
  • Spaces and underscores are skipped, so FF_FF gives 65535

Not read

  • Signed values: FFFFFFFF is read as 4294967295, not as the two's complement -1
  • A # in front, as in #FF8800: remove it first
  • Hex fractions such as 0.8

To see the bits of the same value, use the hex to binary converter, or the number system converter for binary, decimal, hex and octal at once.

Hex to decimal questions

255. F is 15, so FF is 15 × 16 + 15 = 255, the largest value of one byte.

16. The 0x only marks the number as hex, and 10 in hex is one sixteen and no ones.

4294967295, the largest unsigned 32-bit value. Read as a signed two's complement number the same bits mean -1, which this converter does not show.

Yes. ff and FF both give 255, and 0xff works too.

No. The conversion runs in your browser.