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
- Type or paste your hex value into the Hexadecimal input box. A leading 0x is optional.
- Click Load sample if you want to try it with the example 0xDEADBEEF first.
- Read the base 10 number in the Decimal output box, which recalculates on every keystroke.
- 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
- Understanding hexadecimal and base 16
Why programmers use hexadecimal, how base 16 maps cleanly to bytes, and how to convert a hex value to a decimal number by hand.
Related tools
Decimal to Hex
Convert decimal to hexadecimal online. Type any whole number and get the hex value instantly, with optional uppercase and 0x prefix. Runs in your browser.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.
Binary to Hex
Convert binary to hexadecimal online. Paste a binary number and get exact hex, with optional uppercase. Handles huge values. Runs in your browser.