Help

Hex to Decimal Converter

Type or paste a hexadecimal number into Hexadecimal input and Decimal result fills in as you type. The answer is exact however long the number is, with no 64-bit or 2^53 limit. Prefixes like 0x and #, spaces, commas and underscores are ignored, so a raw dump such as 0xDE, 0xAD, 0xBE, 0xEF can be pasted as it is. The conversion runs in your browser and nothing is uploaded or saved.


How to convert hex to decimal

  1. Type or paste your hex number into Hexadecimal input, for example 0xFF or DE AD BE EF.
  2. Read Decimal result. It updates on every keystroke, so there is no convert button to press.
  3. Select Copy decimal to put the number on your clipboard. The button reads Copied for a moment to confirm.
  4. For a long number, turn on Group digits with separators to split the result into groups of three digits, using the separator of the page language (1,208,925,819,614,629,174,706,175 in English, with dots in German). It is off by default, so the copied number is plain digits unless you switch it on.
  5. Select Clear, which appears once there is input, to start over.

What you can paste into the hex box

Whitespace, commas, semicolons and underscores are treated as separators and dropped. Each chunk may start with 0x or #. Upper and lower case are both fine, and so are leading zeros.

You pasteRead asDecimal result
FFFF255
0x1F41F4500
DE AD BE EFDEADBEEF3735928559
0xDE, 0xAD, 0xBE, 0xEFDEADBEEF3735928559
0xBE_EFBEEF48879
#FF8800FF880016746496

Any other character, such as a G, a minus sign, a dot or a trailing h, shows the notice "G" is not a hex digit. Hex uses 0-9 and A-F. with the character it found, and Decimal result stays empty until you remove it.

Hex to decimal examples

HexDecimalNote
FF255Largest 8-bit value
1F4500
100006553616^4
7FFFFFFF2147483647Largest signed 32-bit value
FFFFFFFF4294967295Largest unsigned 32-bit value
2000000000000090071992547409922^53, where ordinary JavaScript numbers start losing digits
FFFFFFFFFFFFFFFF18446744073709551615Largest unsigned 64-bit value
FFFFFFFFFFFFFFFFFFFF120892581961462917470617520 digits, 80 bits

How to convert hex to decimal by hand

Hex is base 16. Each digit is worth 16 times the digit to its right: the places from the right are 1, 16, 256, 4096 and so on. Multiply each digit by its place and add them up. The letters stand for the numbers after 9.

Hex digitABCDEF
Decimal value101112131415

Worked example for 1A3F: 1 x 4096 + 10 x 256 + 3 x 16 + 15 x 1 = 4096 + 2560 + 48 + 15 = 6719. Type 1A3F into Hexadecimal input to check it. By hand this gets slow past a handful of digits, which is where a converter earns its place.

Large hex numbers: 64-bit, 128-bit and longer

Converters built on ordinary floating-point numbers can only hold whole values exactly up to 9007199254740991 (2^53 - 1), and beyond that the last digits are rounded. This page uses JavaScript BigInt instead, so a 64-bit hash fragment, a 128-bit identifier or a 256-bit key converts to its exact decimal value, digit for digit. The limit is 50,000 hex digits. Above that a notice tells you how many digits you entered and asks you to shorten the input.

What this converter does not do


Frequently asked questions

How do I convert hex to decimal?

Type or paste the hex number into Hexadecimal input and read Decimal result, which updates as you type. By hand, multiply each digit by a power of 16, starting with 1 on the right, and add the results: 1F4 is 1 x 256 + 15 x 16 + 4 = 500. The letters A to F stand for 10 to 15.

What is 0xFF in decimal?

255. F is 15, so FF is 15 x 16 + 15 = 255, the largest value one byte can hold. The 0x in front only marks the number as hex and is ignored.

How do I convert a large hex number, such as 64-bit or 128-bit, to decimal?

Paste it as it is. The conversion uses JavaScript BigInt, so there is no 64-bit or 2^53 limit and the result is exact, not rounded. FFFFFFFFFFFFFFFF (the largest 64-bit value) gives 18446744073709551615, and 32 F digits (the largest 128-bit value) give 340282366920938463463374607431768211455. The limit is 50,000 hex digits.

Does it accept the 0x prefix, spaces and commas?

Yes. Spaces, commas, semicolons and underscores are treated as separators and dropped, and each chunk may start with 0x or #. So 0xDE, 0xAD, 0xBE, 0xEF, DE AD BE EF and 0xDEADBEEF all give 3735928559. Upper and lower case both work, and so do leading zeros.

How do I convert a hex color code to decimal?

Paste the code, with or without the #. #FF8800 gives 16746496, because the six digits are read as one single number. If you want the red, green and blue values separately, convert each pair on its own: FF is 255, 88 is 136 and 00 is 0.

Can it convert signed hex to decimal?

No. Every value is read as an unsigned number, so FFFFFFFF gives 4294967295, not -1. For a 32-bit signed reading of a value that starts with 8 to F, subtract 4294967296 from the result yourself. A minus sign in the input is rejected.

Does it convert little-endian hex to decimal?

The digits are read exactly as written, with the leftmost digit the most significant, and the bytes are never reordered. If your data is little-endian, put the bytes in reverse order first: 78 56 34 12 becomes 12 34 56 78, which converts to 305419896.

Is the hex number I paste uploaded anywhere?

No. The conversion runs in your browser tab, and nothing you type is uploaded or saved.


Recommended

Helps keep the tools free. ✨

Images are for illustration only. As an Amazon Associate I earn from qualifying purchases.