Hex to Decimal Converter

Enter a hexadecimal number to get its decimal value, with the powers-of-16 working shown step by step.

Loading tool…

About the Hex to Decimal

Hexadecimal is base 16. The digits 0–9 keep their values and A–F stand for 10–15. Each position is worth 16 times the one to its right: 1, 16, 256, 4096, 65536 … To convert, multiply each digit's value by its power of 16 and add. For 1F4: 1×256 + 15×16 + 4×1 = 256 + 240 + 4 = 500. The table under the result lists every digit, its value, its weight and the product.

Hex is popular because one hex digit is exactly four bits, so two digits make a byte (00–FF = 0–255). That is why memory addresses, colour codes (#FF8800), MAC addresses, UUIDs, hashes and Unicode code points (U+1F600) are written in hex. A few landmarks: 0xFF = 255, 0xFFFF = 65,535, 0x7FFFFFFF = 2,147,483,647 (the largest signed 32-bit integer).

You can paste values straight from code or logs: 0x prefixes, a trailing h (assembly style), spaces, underscores and lower-case letters are all accepted. The value is read as unsigned; for a signed 32-bit interpretation of something like 0xFFFFFFFE (−2), use the two's complement table in the number base converter.

How to use it

  1. Type or paste the hex value — with or without 0x.
  2. Read the decimal value in the highlighted box.
  3. Use the step-by-step table to check each digit's contribution.
  4. Copy the result; binary and octal are listed under “Other bases”.

Frequently asked questions

How do you convert hex to decimal manually?
Replace A–F with 10–15, multiply each digit by 16 raised to its position from the right (starting at 0), and add. 2A = 2×16 + 10 = 42.
What is 0xFF in decimal?
255 (15×16 + 15).
What is FFFF in decimal?
65,535, the largest unsigned 16-bit value.
How do I convert hex to decimal in code?
JavaScript: parseInt('1F4', 16) or Number('0x1F4'); use BigInt('0x…') above 2^53. Python: int('1F4', 16). C#: Convert.ToInt32("1F4", 16).

Related tools