Hex to Decimal Converter

Convert hex to decimal and see the working: each hex digit times its power of 16, added up. Paste values with or without 0x, of any length, and read signed values with two's complement.

Letters A to F work in upper or lower case. A 0x or # prefix and spaces are ignored.

Decimal number

The same number in every base
Binary
Octal
Decimal
Hex
Bit length
Show steps

Each digit is multiplied by its place value, which is a power of the base (2 for binary, 8 for octal, 16 for hex). The products are then added together.

DigitPositionPlace valueDigit × place value
Sum

Two's complement view (signed numbers)

Auto uses as many bits as you typed (4 per hex digit), so 11111011 is read as an 8-bit value.

Width
Bits
Hex
Unsigned
Signed

Convert Hexadecimal Numbers to Decimal Online

Hexadecimal shows up in memory addresses, error codes, color codes, Unicode tables and debugger output. This hex to decimal converter turns any hex value into an ordinary decimal number as you type, and shows its binary and octal forms too.

The steps table multiplies every digit by its power of 16, so you can see exactly where the answer comes from. The two's complement view tells you whether a value such as FFFFFFFF means 4,294,967,295 or −1.

Hexadecimal number converted to decimal0x1A3419Hex toDecimal

How to use the hex to decimal converter

  1. Paste the hex value, for example 1A3, 0x1A3 or #1a3.
  2. Read the decimal result, 419, plus the binary and octal values.
  3. Open the steps to see each power of 16, or the two's complement view for signed values.

How to convert hex to decimal by hand

Hex is base 16. It uses the digits 0–9 and the letters A–F for the values 10 to 15. Each position is worth 16 times the one to its right: 1, 16, 256, 4096 and so on. Multiply every digit by its place value and add the results. For 1A3:

DigitPlace valueDigit × place value
1162 = 2561 × 256 = 256
A (10)161 = 1610 × 16 = 160
3160 = 13 × 1 = 3

So 256 + 160 + 3 = 419.

Hex digits and powers of 16

HexDecimalHexDecimal
0088
1199
22A10
33B11
44C12
55D13
66E14
77F15
PowerDecimal valueHex
16011
1611610
162256100
1634,0961000
16465,53610000
1651,048,576100000
16616,777,2161000000
167268,435,45610000000
1684,294,967,296100000000

Hex to decimal examples

HexDecimalWhere you see it
FF255Largest byte value, color channels
100256One more than FF
3E81000
FFFF65,535Largest 16-bit value
7FFFFFFF2,147,483,647Largest signed 32-bit integer
DEADBEEF3,735,928,559A classic debugging marker

Signed hex values

In a fixed width, a hex value whose first digit is 8 to F has its top bit set, so as a signed two's complement number it is negative: subtract 16digits. In 32 bits FFFFFFFF is 4,294,967,295 − 4,294,967,296 = −1. In 16 bits FF9C is 65,436 − 65,536 = −100, and in 8 bits 80 is −128.

Debuggers and crash logs often print negative error codes this way. Pick the width in the two's complement view, or leave it on Auto to use 4 bits per digit you typed.

Hex colors and Unicode code points

A CSS color such as #FF5733 is three separate bytes, not one number: FF = 255, 57 = 87 and 33 = 51, so it is rgb(255, 87, 51). Converting the whole code gives 16,734,003, which is rarely what you want. Use the HEX to RGB converter for colors.

Unicode code points are also hex: U+00E9 is 233 (é) and U+20AC is 8364 (€). That is why the HTML entity € and € both show the euro sign. To go the other way, use decimal to hex.

Frequently Asked Questions

Common questions about converting hexadecimal numbers to decimal.

Multiply each digit by 16 raised to its position, counting from 0 on the right, and add the results. 2F is 2 × 16 + 15 = 47.

FF is 15 × 16 + 15 = 255, the largest value one byte can hold.

0x marks a number as hexadecimal in C, JavaScript, Python and many other languages. 0x10 is 16, not 10. The converter accepts values with or without it.

Base 16 needs 16 single-character digits, so A to F stand for 10 to 15 after the digits 0 to 9.

No. 1a3 and 1A3 are the same number, 419.

Both, depending on the type. Read as an unsigned 32-bit number it is 4,294,967,295. Read as a signed 32-bit number it is -1. The two's complement view shows both.

Convert each pair separately: #4F46E5 is 79, 70 and 229. The HEX to RGB converter does this for you.

Use the decimal to hex converter, which shows the repeated division by 16.