To convert hex to decimal, multiply each hexadecimal digit by its power-of-16 place value and add the products.

Hexadecimal, usually shortened to hex, is base 16. It uses 0–9 for zero through nine and A–F for ten through fifteen. Converting a hex value is useful when reading memory addresses, byte values, network identifiers, hash digests, or color codes. For routine work, the Number Base Converter performs the conversion while checking every character against the selected base.

hex to decimal
Hex to Decimal: Formula, Steps, and Input Rules

Hexadecimal and decimal at a glance

Decimal and hexadecimal both use positional notation, meaning the position of each digit determines its contribution to the number. The main difference is the base: decimal has ten symbols and uses powers of 10, while hexadecimal has sixteen symbols and uses powers of 16. The rightmost digit always contributes the units value; each position to its left carries the next power of the base.

Number system Base Valid symbols Place-value pattern Common uses
Binary 2 0–1 1, 2, 4, 8, 16… Bit patterns, hardware logic, and machine-level data
Octal 8 0–7 1, 8, 64, 512… Unix file permissions and compact binary groupings
Decimal 10 0–9 1, 10, 100, 1,000… Everyday numerical values and standard arithmetic
Hexadecimal 16 0–9 and A–F 1, 16, 256, 4,096… Memory addresses, byte values, CSS colors, MAC addresses, and hash digests

Hexadecimal is compact because each hex digit corresponds to exactly four bits. That makes it easier for people to read and write certain binary values without handling long strings of zeros and ones.

Convert a hex value with the tool

The Number Base Converter is designed for whole-number conversion and supports every base from 2 through 36. For a hex-to-decimal conversion, the source and destination settings are the important controls.

  1. Enter the whole hex number in the value field. Hex letters are case-insensitive, so uppercase and lowercase forms are treated alike. A leading minus sign is also allowed.
  2. Choose Hexadecimal as the from base and Decimal as the to base. The from-base setting determines how the input is interpreted, while the to-base setting determines how the answer is written.
  3. Read the converted result. The result appears instantly, and the converter also shows the same value in binary, octal, decimal, and hexadecimal at once.

The conversion runs entirely in your browser, and nothing is uploaded. This makes the tool suitable for checking addresses, byte values, configuration numbers, or other values that should remain on the device.

Why place value determines the answer

Manual hex-to-decimal conversion is an exercise in positional expansion. Start at the rightmost digit and assign it position zero. Move left, increasing the exponent by one for every digit. Translate A–F into their numerical values of 10–15, multiply each digit by its place value, and add the products.

Formula: Decimal value = the sum of each digit’s value multiplied by 16 raised to its position.

Worked example using 2A: The rightmost digit has position zero, while 2 has position one. The letter A represents 10.

Substitution: (2 × 16¹) + (10 × 16⁰).

Result: 2A₁₆ = 42₁₀.

The sign is treated separately from the place-value expansion. This method is practical for checking a short value by hand because every digit’s contribution remains visible. For a long value, the converter removes the need to track powers and multiplications manually while still returning the exact decimal result.

Set the input and output bases correctly

The same sequence of symbols can represent different values in different bases, so the base settings control the entire interpretation. Choosing Decimal as the output is not enough if the input is still being read as another system.

  • From base: Select Hexadecimal when the value field contains 0–9 and A–F. This tells the converter that each position represents a power of 16.
  • To base: Select Decimal to receive the answer in base 10. Other destination bases are available when you also need binary, octal, or another representation.
  • Letter case: Uppercase and lowercase hex letters are accepted interchangeably.
  • Negative values: Put the minus sign before the number rather than attempting to include it as a digit.

Strict validation helps prevent a plausible but incorrect answer. The converter checks every character against the chosen base and identifies the invalid character instead of silently dropping it and returning the wrong value. This matters for inputs containing a symbol outside the legal set for the selected numeral system.

Where hexadecimal-to-decimal conversion helps

Hexadecimal is widely used in computing because it represents binary data in a compact form that people can read and edit more easily. Memory addresses, byte values, MAC addresses, and hash digests may all be written in hex. Hex notation is also used in CSS color definitions.

Converting to decimal is useful when the value needs to be evaluated as an ordinary number for arithmetic, comparison, or analysis. Keeping the original hex notation can help when checking source code, configuration files, or system output, while the decimal form makes the numerical magnitude easier to work with.

These conversions also appear in low-level programming, networking, debugging, and digital electronics. If your broader task includes moving values in the opposite direction or among several numeral systems, the guide on converting between number bases in any direction explains how the source and destination choices work together.

Limits that matter for whole-number conversion

Whole numbers only: The converter accepts integers, including negative integers, but it does not support fractional values or inputs containing a decimal point. Converting a fractional value is a separate operation. Removing the fractional part would change the number, so a fraction-aware method is needed when that precision matters.

Exact large-number arithmetic: Arbitrary-precision BigInt arithmetic is used behind the scenes. Very large hexadecimal whole numbers are converted exactly without rounding, loss of precision, or overflow.

Supported bases: Although the immediate task is hexadecimal to decimal, the converter supports any base from 2 through 36. The same digit-validity rules apply after changing the source base.

Private, local processing: The conversion happens entirely in the browser, and the entered number is not uploaded. The displayed results remain available for inspection without sending the value to a remote server.

Check a hand conversion before using it

A short verification routine can catch most mistakes in a manually converted hex value:

  1. Confirm that every symbol is valid for hexadecimal: a decimal digit from 0 through 9 or a letter from A through F.
  2. Assign place values from right to left, beginning with the units position and increasing by one power of 16 for each digit.
  3. Replace every hex letter with its numerical value before performing multiplication.
  4. Multiply each digit by its place value and add all the products, keeping a running total.
  5. Restore the sign, if present, and compare the result with the converter’s decimal output.

This check is especially useful for short values, document references, and troubleshooting exercises. For repeated conversions or very large inputs, using the converter with Hexadecimal as the source and Decimal as the destination gives an exact result without manual bookkeeping.

For a deeper look, see How to Find Rounding Numbers: Manual Rules and Checks.