Convert hexadecimal values such as 0xFF into decimal
Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.Paste a hex value from a memory address, an error code or a colour, with or without the 0x prefix, and get the decimal number. Upper or lower case both work. Values longer than sixteen digits stay exact because the arithmetic uses big integers, and the signed meaning of patterns like 0xFFFFFFFF, which is -1 in 32 bits, is shown below.
The page opens with an example in the Hexadecimal row; type your value over it, with or without 0x.
Read the Decimal row, which stays exact even for values longer than 16 digits.
For a pattern such as FFFFFFFF, pick the width under Two's complement and read the Signed line.
Press the copy icon beside Decimal, or Ctrl+Enter, to copy the result.
This number base converter turns an integer from any base between 2 and 36 into binary, octal, decimal, hexadecimal and a base of your choice at the same time. Type into any row and the others follow, grouped for reading: binary and hex in fours, decimal with thousands separators.
The two's complement panel shows the 8, 16, 32 or 64 bit pattern for a value, its hex form, and both the signed and unsigned readings. A negative number such as -5 becomes 1111 1011 in 8 bits; a positive value with the top bit set, such as 0xFFFFFFFF, is shown as -1 when read as a signed 32-bit integer. Values that do not fit the chosen width are flagged instead of silently wrapping.
All arithmetic uses JavaScript BigInt, so a 40-digit decimal or a 128-bit hex value converts exactly, with no rounding at 2 to the power 53 as ordinary numbers have. Input can include 0b, 0o or 0x prefixes, a minus sign, and spaces, underscores or commas between groups. Only whole numbers are converted; fractions are refused with a message. Nothing leaves your browser.
The rest of the article, and all 6 questions about Number Base Converter, are on the Number Base Converter page.
Multiply each bit by the power of two for its position, counting from 0 on the right, and add the results. 1011 is 1x8 + 0x4 + 1x2 + 1x1, which is 11. Or type the binary number into the Binary row here and read the Decimal row; spaces between groups of bits are fine.
Each hex digit is worth 16 times the digit to its right, with A to F meaning 10 to 15. 0x1F is 1x16 + 15, which is 31. Paste the value, with or without 0x, into the Hexadecimal row and the decimal value appears, exact even for values far longer than 16 digits.
Ordinary JavaScript numbers are floating point and lose precision above 9,007,199,254,740,991 (2 to the power 53, minus 1), so the last digits of a large hex or decimal value get rounded. This tool uses BigInt, which keeps every digit exact at any length up to 4,096 characters.
No, only whole numbers. Fractional values do not convert cleanly between bases, because a short decimal such as 0.1 becomes an endless repeating binary fraction. The tool says so rather than guessing. For floating-point bit patterns, a dedicated IEEE 754 tool is the right choice.
Still stuck? Ask about Number Base Converter and anybody who knows can answer. No account needed.
Same job, other tools: Base58 Encoder and Decoder – Encode text or hex bytes to Base58 with the Bitcoin alphabet, or decode Base58 back.
On the related tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON.
In the collection Developer Converters.