Number base converter

Hexadecimal to Decimal Converter

Convert hexadecimal numbers to decimal or binary instantly. The tool validates your input, supports very large integers, and shows clear conversion steps.

Convert a hexadecimal number

Enter a hexadecimal value and choose whether to convert it to decimal or binary. Hexadecimal uses digits 0–9 and letters A–F.

Decimal result 7038
Convert decimal to hex instead

Live conversion steps

The explanation updates as you type. For very large numbers, the tool keeps the result exact and summarizes the method instead of displaying an overly long step list.

How this result is calculated

  1. Read each hexadecimal digit from right to left.
  2. Replace A, B, C, D, E and F with decimal values 10 through 15.
  3. Multiply each digit value by the matching power of 16 and add the results.
Accuracy note: this converter uses JavaScript BigInt for integer conversion, so large whole numbers are handled exactly instead of being rounded like regular floating-point numbers.

What are hexadecimal and decimal numbers?

The decimal system is the everyday base-10 number system. It uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

The hexadecimal system is base-16. It uses the decimal digits 0–9 plus the letters A, B, C, D, E and F, where A equals 10 and F equals 15.

Hexadecimal is widely used in computing because one hex digit represents exactly four binary bits. This makes long binary values shorter and easier to read.

How to convert hex to decimal

To convert hexadecimal to decimal, multiply each hex digit by a power of 16. The rightmost digit uses 160, the next digit uses 161, then 162, and so on.

1B7E₁₆ = 1×16³ + 11×16² + 7×16¹ + 14×16⁰ = 7038₁₀

This means hexadecimal 1B7E is equal to decimal 7038.

How to convert hex to binary

To convert hexadecimal to binary, replace each hex digit with its four-bit binary equivalent. Then join the groups together.

1 = 0001
B = 1011
7 = 0111
E = 1110
1B7E₁₆ = 1101101111110₂

Leading zeros are usually removed from the final binary value unless the zeros are needed for a fixed-width format.

Common uses of hexadecimal

Hexadecimal is common in programming, debugging, memory addresses, Unicode code points, color codes, checksums and binary file inspection.

For example, web color values often use hexadecimal notation. The color #FF0000 represents red, where FF is the red channel and equals decimal 255.

Input rules

  • Use digits 0–9 and letters A–F for hexadecimal input.
  • Lowercase letters are accepted and automatically normalized to uppercase.
  • Optional prefixes such as 0x are supported.
  • Whole numbers are supported. Fractions are intentionally not converted by this tool.