Hex to Decimal Converter

Decode signed hexadecimal whole numbers into ordinary base-10 integers, with a reverse decimal-to-HEX mode for checking or rebuilding the original value.

Last updated: August 2026 | By Workshelve Team

Result will appear here...

Read base-16 place values

Each position is a power of 16: ones, sixteens, 256s, 4096s, and so on.

A–F are digits

A through F contribute values 10 through 15; they are not separate units or suffixes.

Optional 0x prefix

This page accepts an optional minus sign and one 0x or 0X prefix before the hexadecimal digits.

How to Read a Hexadecimal Number

Hexadecimal is positional notation in base 16. Starting from the right, its places are worth 16⁰, 16¹, 16², 16³, and so on. To convert a hex number to decimal by hand, multiply every digit by its place value and add the products.

The six alphabetic digits extend the familiar 0–9 set: A=10, B=11, C=12, D=13, E=14, and F=15. That means 2F₁₆ is 2×16 + 15, which equals 47 in decimal.

A leading 0x is notation rather than part of the numeric value. This converter also accepts a leading minus sign, so -0x2A and -2A both evaluate to decimal -42.

This tool handles signed whole integers. A minus sign represents the mathematical sign directly; the converter does not infer a fixed-width two's-complement interpretation, and it does not parse hexadecimal fractions.

HEX to Decimal Examples

2A₁₆ → 42₁₀
7B₁₆ → 123₁₀
CAFE₁₆ → 51966₁₀
100₁₆ → 256₁₀
F00D₁₆ → 61453₁₀
DEADBEEF₁₆ → 3735928559₁₀
-2A₁₆ → -42₁₀

Worked Example: 2F3 HEX to Decimal

Expand each digit using its power-of-16 position.

2 × 16² = 2 × 256 = 512
F × 16¹ = 15 × 16 = 240
3 × 16⁰ = 3 × 1 = 3
Add the place values:
512 + 240 + 3 = 755₁₀

HEX to Decimal FAQs

What decimal values do A, B, C, D, E, and F mean?

They are ordinary base-16 digits with values 10, 11, 12, 13, 14, and 15 respectively.

Does 0x change the value of a hexadecimal number?

No. A leading 0x or 0X identifies hexadecimal notation; it does not change the magnitude. The optional minus sign comes before the prefix, so -0x2A and -2A both produce -42.

How is 2F converted to decimal?

Use its place values: 2×16 + 15×1 = 32 + 15 = 47.

Why is FFFF equal to 65535?

FFFF is 15×16³ + 15×16² + 15×16 + 15, which totals 65535.

Are lowercase hex digits accepted?

Yes. The letters a–f and A–F have the same digit values. The converter accepts either case.

Does byte order affect this text conversion?

Not by itself. A written hex integer such as 1234 has an unambiguous numeric value. Endianness matters when interpreting an ordered sequence of bytes in memory or a file, which is a different step.

Can a long HEX value lose precision here?

The validated digit string is converted with BigInt, so the calculation is not limited to JavaScript Number safe-integer precision.

Can I paste spaces or punctuation inside the HEX value?

No. To avoid silently changing malformed data, the tool accepts hexadecimal digits with an optional leading minus sign and one optional 0x prefix. Internal spaces and punctuation are rejected.

Related Tools