Hex to Decimal Converter

Convert hex to decimal exactly, or reverse decimal to hex. Compare signed and unsigned meaning before changing bit width.

Up to 16 hex digits. A 0x prefix, spaces, and underscores are optional.

Try:

Exact hex to decimal, up to 64 bits

Hexadecimal uses digits 0–9 and A–F. This converter keeps every entered digit, including leading zeroes, and uses BigInt so FFFFFFFFFFFFFFFF stays the exact unsigned value 18446744073709551615.

Width changes signed meaning

The same digits can have different signed and unsigned meanings. Source width comes from the digits you enter: FF is 8 bits, while 00FF is 16 bits. The page labels both readings instead of choosing one silently.

Compare extension before widening

Zero extension adds leading zeroes; sign extension repeats the sign bit, which fills leading hex digits with F when that bit is 1. For 8-bit FF widened to 16 bits, the page shows 00FF = 255 beside FFFF = −1 while preserving the original input.

Confirm before dropping high digits

If the selected width is smaller than the input, the tool identifies the high digits that would be lost and the value that would remain. It changes the field only after explicit confirmation. Fractions, floating point, text decoding, bulk rows, and values beyond 64 bits are outside this page.

Frequently asked questions

How do I convert hex to decimal?

Each hexadecimal digit has a power-of-16 place value. Enter up to 16 digits and the converter adds those values with BigInt, preserving exact 64-bit results.

Why can FF mean 255 or -1?

FF is unsigned 255. If those same two hex digits are an 8-bit signed two's-complement value, they mean -1. Width and signedness are part of the meaning.

What is zero extension versus sign extension?

Zero extension adds leading zeroes and preserves an unsigned value. Sign extension repeats the sign bit, filling leading hex digits with F when that bit is 1, and preserves a signed two's-complement value. The page shows both instead of guessing.

What happens if I choose a smaller width?

The converter previews the high hex digits that would be discarded and the kept value. It does not replace your original input until you press the confirmation button.

Can this convert decimal to hex?

Yes. Choose Decimal → Hex and select 8, 16, 32, or 64 bits. Unsigned and signed results are labeled separately, including values that do not fit the selected width.

Sources and method

Related tools