Hex to Decimal Converter

Convert hexadecimal to decimal instantly, including exact large integers, hex fractions, binary output, and signed two's-complement values.

Base 16 → Base 10
Exact BigInt Results
2's Complement
A₁₆

Enter a Hexadecimal Number

₁₆
Supports A–F, 0x prefix, fractions, spaces, underscores, and leading minus.
Try an example
Hex to decimal calculation steps

3 × 16¹ + 11 × 16⁰ = 59

10

Live Results

Decimal number
59
Signed 2's complement
59
uses the entered hex digit width
Binary number
111011
base 2
Digit grouping
3B
groups of four hex digits

How Hex to Decimal Conversion Works

Hexadecimal is base 16, so each position is worth a power of 16. Replace A–F with 10–15, multiply every digit by its positional value, and add the products.

decimal = dₙ₋₁ × 16ⁿ⁻¹ + … + d₂ × 16² + d₁ × 16¹ + d₀ × 16⁰
3B₁₆

3 × 16¹ + 11 × 16⁰ = 48 + 11 = 59₁₀

E7A9₁₆

14 × 16³ + 7 × 16² + 10 × 16¹ + 9 = 59,305₁₀

0.8₁₆

8 × 16⁻¹ = 8 ÷ 16 = 0.5₁₀

Hexadecimal (base 16)

Hex uses sixteen symbols: 0–9 and A–F. It is compact, maps neatly to four-bit binary groups, and is common in programming, memory addresses, byte values, and colors.

Decimal (base 10)

Decimal uses digits 0–9. Each position is a power of 10, making it the familiar system for everyday arithmetic and human-readable numeric values.

± Signed Hex and Two's Complement

Computers often store signed integers in two's-complement form. The highest bit is the sign bit: a clear bit means non-negative; a set bit means the value is negative.

For an n-bit hexadecimal value with its sign bit set, calculate signed value = unsigned value − 2ⁿ. Two hex digits use 8 bits, four use 16 bits, and so on.

Example: FF is 255 unsigned. At 8 bits, 255 − 256 = −1. Writing 00FF changes the width to 16 bits, so its signed value is 255.

HexUnsignedSigned
7F127127
80128−128
FF255−1
FFFF65,535−1

# Hex to Decimal Conversion Table

HexDecimalCalculation
0–90–9same digit value
A1010 × 16⁰
B1111 × 16⁰
C1212 × 16⁰
D1313 × 16⁰
E1414 × 16⁰
F1515 × 16⁰
10161 × 16¹ + 0
1A261 × 16¹ + 10
20322 × 16¹ + 0
FF25515 × 16¹ + 15
1002561 × 16²

? Frequently Asked Questions

How to convert hex to decimal?

Assign each hexadecimal digit its value (A=10 through F=15), multiply it by 16 raised to its position counting from zero at the right, and add the products. For example, 3B = 3×16¹ + 11×16⁰ = 59.

Can I enter hexadecimal numbers with a 0x prefix?

Yes. The converter accepts an optional 0x prefix, so 0xFF and FF both convert to 255.

How do hexadecimal fractions convert to decimal?

Digits after the hexadecimal point use negative powers of 16. For example, 0.8₁₆ = 8×16⁻¹ = 0.5₁₀. This tool uses exact integer arithmetic for the fractional conversion.

What do A, B, C, D, E, and F mean in hex?

They represent decimal values 10, 11, 12, 13, 14, and 15. Hex needs these extra symbols because one digit must represent sixteen possible values.

How is a signed hexadecimal value converted?

For two’s complement, use the entered bit width. If the highest bit is set, subtract 2 raised to that width from the unsigned value. FF at 8 bits is 255−256=−1; 00FF at 16 bits is positive 255.

Does this converter handle very large hexadecimal numbers?

Yes. Integer and fractional calculations use BigInt-based exact arithmetic, so values beyond JavaScript’s usual safe integer range do not lose digits. Input is capped at 256 hex digits to keep the browser responsive.