Tools
EN

Hex to Decimal Converter

Type a hexadecimal number such as FF or 0x1A and see its decimal value instantly, with the calculation shown step by step. The converter also gives binary and octal, reads signed (two's complement) and fractional values and converts whole lists at once.

Tip: enter one number per line to convert a whole list.

In all bases

Hexadecimal
Decimal
Binary
Octal

Private: your data is processed in your browser and never uploaded.

How to use the hex to decimal converter

  1. Type or paste a hex number into the input box. Prefixes such as 0x or #, a trailing h, spaces and underscores are all accepted. Enter one number per line to convert a list.
  2. The decimal value appears instantly, together with the binary and octal values and a step-by-step explanation of the calculation.
  3. If the hex value is a signed integer, tick Signed (two's complement) and pick the bit width – for example FF is −1 as an 8-bit number. Then copy the result.

How to convert hex to decimal

Hexadecimal is a base-16 number system. It uses the digits 0–9 and the letters A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Each position is worth 16 times more than the one to its right, so the hex to decimal conversion formula is:

decimal = dₙ × 16ⁿ + … + d₂ × 16² + d₁ × 16¹ + d₀ × 16⁰

Multiply every digit by the power of 16 for its position, counting from 0 on the right, and add the results. Example: 3C = 3 × 16 + 12 = 60, and 1A3F = 1 × 4096 + 10 × 256 + 3 × 16 + 15 × 1 = 4096 + 2560 + 48 + 15 = 6719.

PositionPower of 16Decimal value
016⁰1
116¹16
216²256
316³4096
416⁴65536
516⁵1048576

Hex to decimal table

The hex values people look up most often, with their decimal equivalents. One byte ranges from 00 to FF (0–255); the notes show the ASCII character or what the value means in programming.

HexDecimalGood to know
101616¹
1A261 × 16 + 10
2032ASCII space
2A42ASCII *
3C60ASCII <
64100ASCII d
7F127Largest signed 8-bit value
80128−128 as a signed byte
FF255Largest byte value; −1 as a signed byte
10025616²
3E810003 × 256 + 14 × 16 + 8
7FFF32767Largest signed 16-bit value
FFFF65535Largest 16-bit value; −1 as a signed 16-bit number
7FFFFFFF2147483647Largest signed 32-bit integer
FFFFFFFF4294967295Largest unsigned 32-bit integer

Hex to decimal in Python, JavaScript and Excel

Why use Online Hex Converter?

Frequently asked questions

What is FF in decimal?

FF in hex is 255 in decimal: 15 × 16 + 15 = 255. It is the largest value one byte can hold. Read as a signed 8-bit number (two's complement), the same bits mean −1.

How do I convert a negative hex number to decimal?

If the hex number has a minus sign, convert the digits and keep the sign: −1A = −26. If it is a two's-complement value such as FFFE, tick Signed (two's complement) and choose 16-bit: the converter subtracts 2¹⁶ = 65536 from 65534 and shows −2.

Can I convert hex numbers with a fractional part?

Yes. Digits after the point are worth 16⁻¹ = 1/16, 16⁻² = 1/256 and so on, so 1A.8 = 26 + 8/16 = 26.5 and 0.4 = 0.25.

Is there a limit on the size of the hex number?

No practical limit. The converter uses arbitrary-precision integers, so 64-bit values such as FFFFFFFFFFFFFFFF (18446744073709551615) and even longer hex strings are converted exactly, without rounding.