Skip to content
Devtoolry

Hex to Decimal Converter

Convert hexadecimal to decimal online with each digit's place value shown. Reads 0x prefixes, fractions and signed two's complement values such as FF9C = -100.

Runs in your browser · Nothing uploaded · No sign-up

Something not working, or missing a feature? Send feedback

About the Hex to Decimal Converter

The Hex to Decimal Converter turns hexadecimal values such as FF, 0x1A3F or #FF9C into decimal and shows each digit's place value, from 16⁰ = 1 upwards. Turn on signed mode to read a hex dump or register value as a two's complement integer, so FF9C becomes −100.

Conversion happens in your browser, so your files and records stay private.

How to use the Hex to Decimal Converter

  1. Type or paste a hex number. Prefixes such as 0x, # and a trailing h are accepted, and case does not matter.
  2. Turn on "Signed (two's complement)" if the value is a signed integer from memory or a register.
  3. Read the decimal value and the table of digits multiplied by powers of 16.
  4. Paste several values, one per line, to convert a whole column at once.

Hex digits and their 4-bit patterns

One hex digit always stands for exactly four bits, which is why the conversion works digit by digit.

HexBinaryDecimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
A101010
B101111
C110012
D110113
E111014
F111115

Powers of 16

PositionPowerDecimal 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

Examples

One byte

Input

FF

Result

255
With a 0x prefix

Input

0x7FFFFFFF

Result

2147483647

The largest signed 32-bit integer (INT_MAX).

A signed 16-bit value

Input

FF9C (Signed on)

Result

-100
Letters as digits

Input

1A3F

Result

6719

Common mistakes

  • Confusing hex and decimal digits. 10 in hex is sixteen, not ten. When a value has no letters, check whether it is really hexadecimal before converting.
  • Byte order in memory dumps. Little-endian machines store the lowest byte first, so the bytes 9C FF in a dump are the value FF9C. Reverse the bytes before converting.

Works well with the Hex to Decimal Converter

Frequently asked questions

How do you convert hex to decimal?

Multiply each digit by 16 raised to its position, counting from 0 on the right, and add the results. Letters count as A = 10 up to F = 15. For 1A3F: 1×4096 + 10×256 + 3×16 + 15 = 6719.

What is 0xFF in decimal?

255: F × 16 + F = 15 × 16 + 15. It is the largest value of one byte, which is why it appears in colours (#FFFFFF) and masks.

How do I read a negative hex number?

Turn on signed mode. The width is 4 bits per hex digit, so FF9C is read as 16 bits: its top bit is set, so its value is 65,436 − 65,536 = −100. Type all digits, including leading zeros, for the right width.

Can I convert hex fractions?

Yes. Digits after the point are worth 1/16, 1/256 and so on, so 0.8 in hex is 0.5. The decimal result is always exact.