Hex to Decimal Converter

Convert hexadecimal values (unsigned or signed 32-bit / 64-bit Two's Complement) into exact base-10 decimal integers with step-by-step power-of-16 weight expansion.

Presets:
int32
BigInt exact · Zero floating-point loss
Decimal Integer (int32)
420
Unsigned Dec: 420
Signed int32: 420
Signed int64: 420
Octal: 0o644
Binary: 0000 0000 0000 0000 0000 0001 1010 0100
Step-by-Step Positional Expansion (0x1A4)1×16^2 + 10×16^1 + 4×16^0 = 420
Hex DigitDigit ValuePower of 16Place WeightTerm Contribution
1116^22561 × 256 = 256
A1016^11610 × 16 = 160
4416^014 × 1 = 4

Powers of 16 & 32-Bit Integer Boundaries

Base 16 → Base 10
Hex ValueExpressionDecimalEngineering Context
0x116⁰1Least significant hex digit
0x1016¹161 nibble overflow
0xFF16² − 1255Max unsigned 8-bit byte (uint8)
0x10016²2562⁸ boundary
0x100016³4,0964 KiB memory page
0xFFFF16⁴ − 165,535Max unsigned 16-bit (uint16 / TCP port)
0x7FFFFFFF2³¹ − 12,147,483,647Max signed 32-bit integer (int32)
0x80000000−2³¹−2,147,483,648 (int32)Min signed 32-bit / 2,147,483,648 unsigned
0xFFFFFFFF2³² − 14,294,967,295 / −1Max uint32 or −1 in signed int32

Click any boundary value to inspect its positional base-16 expansion and signed/unsigned 32-bit or 64-bit interpretation.

Signal & Number Converters

7 tools

Power-of-16 Positional Expansion & 32/64-Bit Two's Complement

A hex to decimal conversion expands any base-16 numeral as N = Σ d_k × 16^k, where each digit d_k spans 0–9 and A=10 … F=15. In systems programming, firmware registers, and memory inspection, the same 8-digit or 16-digit hex pattern carries two distinct decimal meanings depending on whether the register is interpreted as unsigned (uint32 / uint64) or signed Two's Complement (int32 / int64).

Looking to convert multi-byte text strings into hex dumps or inspect individual binary bit weights? Explore our companion Hex Converter and Binary to Decimal workbenches.

“A hexadecimal constant consists of the prefix 0x or 0X followed by a sequence of the decimal digits and the letters a through f with values 10 through 15 respectively.”

Hex to Decimal Technical Notes

How do you convert hexadecimal to decimal step by step?
Replace hex letters A–F with 10–15, multiply each digit from right to left by successive powers of 16 (16⁰ = 1, 16¹ = 16, 16² = 256, ...), and add the products. For example, 0x1A4 = 1×256 + 10×16 + 4×1 = 420.
Why does 0xFFFFFFFF equal −1 in signed 32-bit mode but 4,294,967,295 in unsigned mode?
All 32 bits of 0xFFFFFFFF are set to 1, including the sign bit (bit 31). Under Two's Complement int32 rules, values at or above 0x80000000 subtract 2³² (4,294,967,296), yielding 4,294,967,295 − 4,294,967,296 = −1.
Does this hex to decimal tool handle full 64-bit signed and unsigned values accurately?
Yes. Every calculation uses JavaScript BigInt rather than IEEE-754 doubles, so full 64-bit bounds like 0xFFFFFFFFFFFFFFFF (18,446,744,073,709,551,615 unsigned / −1 signed int64) remain exact to the last digit.
Should I include the 0x prefix when pasting hexadecimal values?
Either format works. The parser automatically strips optional 0x prefixes, # prefixes, spaces, underscores, and commas before computing the expansion.