Boneyard Tools

Hex to Decimal Converter

Paste a hexadecimal value and read its decimal (base 10) equivalent as you type. A leading 0x, internal spaces and any mix of upper or lower case letters are all accepted, and the math uses BigInt so even values larger than 64 bits stay exact. Nothing is sent to a server, so the conversion happens entirely on your device.

How to convert hex to decimal

  1. Type or paste your hex value into the Hexadecimal input box. A leading 0x is optional.
  2. Click Load sample if you want to try it with the example 0xDEADBEEF first.
  3. Read the base 10 number in the Decimal output box, which recalculates on every keystroke.
  4. Press the Copy button to put the decimal result on your clipboard.

Examples

Single byte

0xFF
255

32-bit word, no prefix and lowercase

deadbeef
3735928559

Largest unsigned 64-bit value

0xFFFFFFFFFFFFFFFF
18446744073709551615

Frequently asked questions

How does hex to decimal conversion work?

Hexadecimal is base 16, so each digit is worth a power of 16. Reading from the right, the place values are 1, 16, 256, 4096 and so on, and the digits are multiplied by their place value and summed. For example 0xFF is 15 times 16 plus 15, which equals 255.

What does the 0x prefix mean?

0x is a convention that labels a number as hexadecimal in many programming languages, such as C, Java and JavaScript. It is not part of the value itself. The converter strips a single leading 0x or 0X, so FF and 0xFF produce the identical result.

Does letter case matter?

No. The hex digits A through F are case-insensitive, so ff, FF and Ff all convert to 255. You can paste values in whatever case you copied them in without cleaning them up first.

Can it handle very large hex numbers?

Yes. The conversion uses JavaScript BigInt for arbitrary precision, so values far beyond the 64-bit range convert exactly with no rounding. A regular floating point number would lose precision past about 15 or 16 digits, but BigInt does not.

Are spaces in my input a problem?

No. All whitespace is removed before conversion, so a value grouped for readability like FF 00 A3 is treated the same as FF00A3. This makes it easy to paste bytes copied from a hex dump.

What happens if my input is not valid hex?

If the value contains anything other than the digits 0 to 9 and the letters A to F, after the optional 0x and any spaces are removed, you get an Invalid hexadecimal message and no result. A negative sign or a decimal point counts as invalid.

How do I go the other way, from decimal to hex?

Use the Decimal to Hex converter linked in the related tools. This page only converts hexadecimal into base 10, not back again.

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser using local JavaScript, so your hex value never leaves your device and works even offline once the page has loaded.

Learn more

Related tools