Hex to decimal converter

Enter a hexadecimal number and get the decimal value straight away: FF is 255 and 1A3 is 419. Paste a list to convert many at once, and open "Show the working" to see the powers-of-16 sum behind each answer.

Decimal to hex

Show the working
One number per line, or separate them with spaces.0 numbers
Checked byTomeshia Brock
Reviewed bySam Siewert
Last updated · How we test

Runs in your browser. Nothing you type is uploaded.

How to use the converter

  1. Type or paste hex values, one per line or separated by spaces. 0x and # prefixes are fine, and case does not matter.
  2. Read the decimal results on the right.
  3. Copy, download or share them.

Width and Signed. Tick Signed to read hex as two's complement: FFFFFFF6 gives -10 and FF gives -1. With Width on Auto, the size comes from the digits you type (two hex digits are 8 bits, eight are 32 bits); pick 16, 32 or 64 bits to read a shorter value inside a bigger type. Binary and octal for the first number appear under the boxes, and Open file converts a whole list from a .txt or .csv file.

There is no size limit. A 16-digit value like FFFFFFFFFFFFFFFF converts to exactly 18446744073709551615. Excel's HEX2DEC stops at 10 hex digits, and some online converters cap the input at 16 digits or round anything above 253.

How to convert hex to decimal

Hex digits run from 0 to 9 and then A to F, where A is 10 and F is 15. Each position is worth 16 times the one to its right: 1, 16, 256, 4096 and so on, the same hexadecimal place values that work like decimal ones with a bigger step. To convert, multiply every digit by its place value and add the results. Going the other way, from base 10 to base 16, takes repeated division, which the decimal to hex converter shows step by step.

Hex 1A3 broken into digits: 1 times 256, A (10) times 16 and 3 times 1, which add up to 256 + 160 + 3 = 419.
  1. Write the digit values: 1, A = 10, 3.
  2. Write the place values from the right: 256, 16, 1.
  3. Multiply and add: 1 × 256 + 10 × 16 + 3 × 1 = 256 + 160 + 3 = 419.

As a formula, a hex number with digits hn-1 ... h1 h0 is worth hn-1 × 16n-1 + ... + h1 × 16 + h0.

The running-total method

For longer numbers, a running total saves writing out big powers of 16. Start with the first digit. For each next digit, multiply the total by 16 and add the digit. For 7DE: start at 7, then 7 × 16 + 13 = 125, then 125 × 16 + 14 = 2014.

Hex digits and powers of 16

Almost every hand conversion only needs these two lists.

Reference card: hex letters A to F equal 10 to 15, and the powers of 16 are 1, 16, 256, 4,096, 65,536 and 1,048,576.

Hex to decimal chart

HexDecimalHexDecimal
A103048
F153351
10163C60
12184064
1E3064100
1F317F127
203280128
FF2553E81000
1002564001024
FFFF655357FFFFFFF2147483647
C0FFEE12648430FFFFFFFF4294967295

Watch out for 10, 100 and 12. In hex they mean 16, 256 and 18, not ten, a hundred and twelve. When a value could be either, a 0x prefix or a subscript 16 removes the doubt.

Hex color codes to RGB

A CSS color such as #FF8800 is three hex bytes: red, green and blue, in that order, as the MDN guide to hex colors lays out. Split it into pairs and convert each one. FF is 255, 88 is 136 and 00 is 0, so the color is rgb(255, 136, 0). Type FF 88 00 into the converter to get all three at once.

Signed hex to decimal

With Signed unticked, the converter treats hex as an unsigned number. A debugger showing FFFFFFF6 for a 32-bit int means -10, but the unsigned reading is 4294967286. Tick Signed and the converter gives -10. Signed integers are stored in two's complement, and the rule for reading them is short.

The 32-bit hex value FFFFFFF6 read as unsigned is 4,294,967,286; read as a signed two's complement integer it is 4,294,967,286 minus 4,294,967,296, which is -10.

Check whether the first digit is 8 or higher, using the full width of the value (8 digits for 32 bits, 4 for 16 bits, 2 for 8 bits). If it is, subtract 2 to the power of the bit width from the unsigned result. For 16 bits that means subtracting 65,536, so FFFF is -1 and 8000 is -32,768. For 8 bits subtract 256, so F6 is -10.

Hex to decimal in Excel, Python and JavaScript

Excel and Google Sheets: =HEX2DEC("1A3") returns 419. According to Microsoft's HEX2DEC reference, the input is limited to 10 characters (40 bits) and the top bit is a sign bit, so values from 8000000000 upward come back negative.

Python: int('1A3', 16) returns 419 with no size limit, and int('0x1A3', 0) reads the prefix for you. JavaScript: parseInt('1A3', 16) returns 419 (parseInt on MDN). Above 253 it loses precision, so use BigInt('0x' + hex) for long values.

Frequently asked questions

What is FF in decimal?

255. F is 15, so FF is 15 × 16 + 15. It is the largest value that fits in one byte. Bytes are not always numbers, though: 48 69 read as character codes is "Hi", which hex to text decodes for you.

What is 12 hex in decimal?

18. The 1 is worth 16 and the 2 is worth 2.

What is 7FFFFFFF in decimal?

2147483647. It is the largest signed 32-bit integer, which is why it shows up as a maximum value in many programs.

What is FFFFFFFF in decimal?

4294967295 as an unsigned 32-bit number. Read as a signed 32-bit integer, the same bits are -1.

Is 1 hex digit 16 bits?

No. One hex digit is 4 bits, and it can hold 16 different values (0 to F). Hex to binary shows those 4 bits for every digit. Four hex digits make 16 bits.

Is hex case-sensitive?

No. ff, FF and Ff are all 255.

Is my input sent anywhere?

No. The conversion runs in your browser.

Scroll to Top