Hexadecimal

Convert between hexadecimal and decimal, up to 8 hex digits.

Direction

Digits 0–9 and A–F, up to 8

Hex uses 0–9 and A–F, up to 8 digits. Decimal is a whole number from 0 to 4,294,967,295. Leading zeros do not change the value.

Enter a hexadecimal number.

How hexadecimal becomes decimal

Each hex digit is a power of 16. The rightmost digit is 16⁰, the next is 16¹, and so on. A is 10 and F is 15.

The other direction writes a whole number as those powers of 16. This calculator allows up to 8 digits, from 0 through 4,294,967,295.

How to use this calculator

  1. Choose hex to decimal, or decimal to hex.
  2. Enter the number. Hex uses 0–9 and A–F.
  3. Read the result. The row below shows how many hex digits the value uses.

Place values

Add each digit times its power of 16.

Hex digits as powers of 16
n=∑k=0mdk·16k

FF is 15×16 + 15 = 255. A is 10. The same steps run backward to write 255 as FF.

Source

Hexadecimal place values are defined on the Wikipedia page on hexadecimal.

Worked examples

Example: FF

Hex FF is decimal 255.

Example: A

Hex A is decimal 10.

What to keep in mind

Hex 10 is decimal 16. Hex 0 is decimal 0. Decimal 255 is hex FF. A digit outside 0–9 and A–F has no result, and so does a number above 4,294,967,295. A completed result, including the number, can be stored in this browser’s local history and never leaves your device. Clear it with the history Clear action or by clearing site data.

Common questions about hexadecimal

What is hex FF in decimal?

255.

What is hex A in decimal?

10.

What is decimal 255 in hex?

FF.

What is hex 10 in decimal?

16.

What is hex 0?

Decimal 0.

Does this calculator store my number?

A completed result can be saved in this browser’s local history, including the number. It stays on your device and is not sent to our servers or to analytics. Clear it with the history Clear action or by clearing site data.