Number systems

How to Convert Hexadecimal to Decimal

Convert hexadecimal to decimal by hand with place values and worked examples, understand 0x notation and verify the answer with a free converter.

0x2F47
Plain Tools original diagram for this guide.

Hexadecimal uses sixteen symbols: 0–9 and A–F. Each position is a power of 16, so 2F means 2 × 16 + 15, which equals 47.

The key idea

For 1A3, calculate 1 × 16² + 10 × 16 + 3 = 419. Writing the powers below the digits prevents a skipped position in longer values.

Hexadecimal place values

Hexadecimal is base 16. Its digits represent values zero through fifteen: A=10, B=11, C=12, D=13, E=14 and F=15. Moving one place left multiplies the place value by 16.

PositionPowerDecimal value
Rightmost1601
Second16116
Third162256
Fourth1634,096

Worked hex-to-decimal conversions

For 2F, calculate 2 × 16 + 15 = 47. For 1A3, calculate 1 × 256 + 10 × 16 + 3 = 419. For 0x1F to decimal, ignore the programming prefix: 1 × 16 + 15 = 31.

You can check 419 in reverse by repeated division. Dividing by 16 gives remainder 3; dividing quotient 26 by 16 gives remainder 10, written A; the final quotient is 1. Read upward to get 1A3.

Where hexadecimal appears

One hex digit represents four binary bits and two digits cover a byte from 00 to FF. Web colors use pairs for red, green and blue: #FF8000 has decimal channel values 255, 128 and 0. Memory addresses and byte dumps often use a 0x prefix.

Common errors

  • Treating A through F as invalid.
  • Using powers of 10 instead of 16.
  • Starting the rightmost power at 1 instead of 0.
  • Including 0x as digits.
  • Dropping meaningful leading zeros.

Verify values with the hex to decimal converter. For other radices use the base converter, then connect results to bits with the decimal to binary converter.

A practical workflow

The hexadecimal converter accepts common 0x notation and displays the decimal answer. Keep leading zeros when a value represents a fixed-width address, color channel or data field.

Checks and limitations

Hex appears in programming, byte values and web colors. Use the base converter for another radix and decimal-to-binary when you need to connect the result to bit patterns.

Check the result in the working tool

Open the Hex to decimal converter with the same values used in the example. Read the labels and units beside the result, then keep the source information until the output has been checked for its intended use.

Quick answers

Frequently asked questions

What is 0x1F in decimal?

0x1F is 31: 1 × 16 plus 15.

Does letter case matter in hexadecimal?

No. ff and FF both represent decimal 255. Uppercase is often used simply to make hexadecimal values easier to recognize.

What is FF in decimal?

FF is 15 × 16 + 15, which equals 255. It is the largest unsigned value that fits in one byte.

Why do programmers prefix hexadecimal values with 0x?

The prefix tells readers and software that the following digits use base 16. It is notation rather than part of the numeric value being converted.

Use the tool

Put this guide into practice

Hex to decimal converter Check a hexadecimal value → Number base converter Compare common number systems → Decimal to binary converter Connect the result to bits → Hex color converter Read hexadecimal color channels →