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...
Each position is a power of 16: ones, sixteens, 256s, 4096s, and so on.
A through F contribute values 10 through 15; they are not separate units or suffixes.
This page accepts an optional minus sign and one 0x or 0X prefix before the hexadecimal digits.
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.
Expand each digit using its power-of-16 position.
They are ordinary base-16 digits with values 10, 11, 12, 13, 14, and 15 respectively.
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.
Use its place values: 2×16 + 15×1 = 32 + 15 = 47.
FFFF is 15×16³ + 15×16² + 15×16 + 15, which totals 65535.
Yes. The letters a–f and A–F have the same digit values. The converter accepts either case.
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.
The validated digit string is converted with BigInt, so the calculation is not limited to JavaScript Number safe-integer precision.
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
Convert HEX color codes into RGB color values.
Convert number base values.
Convert Base64 encoded data into hexadecimal values.
Convert hexadecimal values into Base64 encoded data.
Convert binary values into hexadecimal numbers.
Convert hexadecimal values into binary numbers.