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.
Powers of 16 & 32-Bit Integer Boundaries
Base 16 → Base 10| Hex Value | Expression | Decimal | Engineering Context |
|---|---|---|---|
| 0x1 | 16⁰ | 1 | Least significant hex digit |
| 0x10 | 16¹ | 16 | 1 nibble overflow |
| 0xFF | 16² − 1 | 255 | Max unsigned 8-bit byte (uint8) |
| 0x100 | 16² | 256 | 2⁸ boundary |
| 0x1000 | 16³ | 4,096 | 4 KiB memory page |
| 0xFFFF | 16⁴ − 1 | 65,535 | Max unsigned 16-bit (uint16 / TCP port) |
| 0x7FFFFFFF | 2³¹ − 1 | 2,147,483,647 | Max signed 32-bit integer (int32) |
| 0x80000000 | −2³¹ | −2,147,483,648 (int32) | Min signed 32-bit / 2,147,483,648 unsigned |
| 0xFFFFFFFF | 2³² − 1 | 4,294,967,295 / −1 | Max 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 toolsPower-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.”
— Standard reference: ISO/IEC 9899 (WG14 C Standard) — Integer & Hexadecimal Constants
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.