Home  /  Developer Tools / Number Converters

Hex to Decimal Converter

Convert any hexadecimal value to decimal in seconds, with a clear explanation of how each digit contributes to the answer.

Last updated 13 November 2026

Hexadecimal Number Tool

Your result appears here.
Steps appear here after conversion.

Whole numbers only. Very large numbers are handled exactly with BigInt, so there is no rounding from floating point maths.

Hexadecimal is base 16. It uses digits 0 to 9 plus letters A to F, where A is 10 and F is 15. Decimal is the base 10 system we use every day. This converter turns a hex value into the decimal number it stands for.

How to Use This Tool

  1. Enter a hex number: type hex digits, with or without a 0x prefix.
  2. Click Convert: the decimal result appears at once.
  3. Copy the result: paste it into code, a spreadsheet, or a document.

The Formula

Multiply each hex digit by 16 raised to the power of its position, counting from 0 on the right, then add the values. For example, FF is 15 times 16 plus 15, which is 255.

Worked Examples

HexDecimal
A10
2A42
FF255
4001024

Why Use This Tool

Hex values appear in colour codes, memory addresses, and file data. Converting them to decimal makes them easier to compare, add, and explain to anyone who does not work in hex every day.

What Is Hexadecimal?

Hexadecimal is a number system with base 16. It uses the digits 0 to 9 and the letters A to F, where A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15. One hex digit holds exactly four bits, which is why programmers use it. You see hex in color codes like #FF5733, in memory addresses, in MAC addresses, in file hashes, and in code where a byte is written as two hex digits. A byte can hold any value from 00 to FF, which is 0 to 255 in decimal.

How to Convert Hex to Decimal Step by Step

Converting hex to decimal is a matter of place values. Each hex digit is multiplied by 16 raised to the power of its position, counting from 0 on the right, and the results are added. Here is a full worked example with the value 1A3F:

Add them: 4096 plus 2560 plus 48 plus 15 is 6719. So 1A3F in decimal is 6719. Try it in the tool above: enter 1A3F and the converter shows the same answer with the steps worked out.

Hex Values You See in Code

A few hex values appear in code so often that it helps to know them by heart:

Note that 0xFF as a signed 8 bit value is -1, not 255. This tool reads hex as unsigned, so it gives 255 for FF. If you need the signed reading, use a signed hex converter.

Hex to Decimal in Code

If you convert hex in code instead of a tool, here is how in three common languages. In JavaScript, use parseInt with base 16: parseInt("FF", 16) returns 255. In Python, use int with base 16: int("FF", 16) returns 255. In Excel, use the HEX2DEC function: =HEX2DEC("FF") returns 255. Leave the 0x prefix off in Excel, since HEX2DEC takes only the hex digits.

Hex to decimal is one of several number conversions on this site. To go the other way, use the Decimal to Hex Converter. To convert hex to another base, use the Hex to Binary Converter or the Hex to Octal Converter. For binary, use the Binary to Decimal Converter, the Decimal to Binary Converter, or the Binary to Hex Converter. To convert text, use the Text to Binary Converter. To convert octal, use the Octal to Decimal Converter.

Frequently Asked Questions

Yes. It is free, needs no sign up, and runs in your browser.

Yes. Values with or without a 0x prefix both work.

Yes. Lowercase a to f and uppercase A to F give the same result.

FF in decimal is 255, because 15 times 16 plus 15 is 255.

Yes. It uses BigInt, so very large hex values convert exactly.

Write each hex digit, multiply it by 16 raised to the power of its position from the right, starting at 0, and add the values. For example, 1A3 is 1 times 256 plus 10 times 16 plus 3, which is 419.

0x is a prefix that marks a number as hexadecimal. It tells you the digits that follow are in base 16, not base 10. You can include it or leave it out; this tool accepts both.

In Excel, use the HEX2DEC function. Type =HEX2DEC("FF") in a cell, and Excel returns 255. Leave the 0x prefix off, since HEX2DEC takes only the hex digits.

Use the Decimal to Hex Converter on this site. Enter a decimal number, and it gives you the hex value.

7F in decimal is 127, because 7 times 16 plus 15 is 127.

A signed hex value uses two's complement, so the top bit marks a negative number. For example, FF as an 8 bit signed value is -1, not 255. This tool reads hex as unsigned, so it gives 255 for FF.

Hexadecimal is shorter than binary and maps cleanly to it, since one hex digit is exactly four bits. That makes it easy to read memory addresses, color codes, and byte values.