Boneyard Tools

Decimal to Hex Converter

Paste or type any non-negative whole number and read its hexadecimal value the moment you stop typing. Commas and spaces in the input are ignored, so grouped numbers like 1,000,000 work without cleanup. Toggle uppercase digits or a 0x prefix, and copy the result with one click.

How to convert decimal to hex

  1. Type a non-negative whole number into the Decimal number box, or press Load sample for 255.
  2. Leave in any commas or spaces; they are stripped before conversion.
  3. Tick Uppercase (A-F) if you want the letters capitalized.
  4. Tick Add 0x prefix to mark the output as a hex literal.
  5. Read the value in the Hexadecimal output box and press copy to grab it.

Examples

One byte

255
ff

Grouped number with commas

1,000,000
f4240

Uppercase with 0x prefix

3735928559
0xDEADBEEF

Frequently asked questions

How does decimal to hex conversion work?

Decimal is base 10 and hexadecimal is base 16. The number is repeatedly divided by 16, and each remainder becomes a hex digit from 0-9 then a-f, read from the last remainder to the first. So 255 divides into 15 remainder 15, which reads as ff.

What is hexadecimal used for?

Hex is a compact way to write binary because two hex digits cover exactly one byte. You see it in web colors like #ff8800, memory addresses, byte dumps, hashes and machine code, where long strings of bits would be hard to read.

Does it accept commas and spaces?

Yes. Any spaces and commas are removed before conversion, so 1,000,000 and 1 000 000 both convert to f4240. This lets you paste grouped numbers straight from a spreadsheet or document without editing them first.

What is the difference between uppercase and lowercase hex?

They represent the same value; ff and FF are equal. Lowercase is common in code and CSS, while uppercase often appears in hardware docs and hash output. The Uppercase toggle only changes the letters A to F, never the digits.

What does the 0x prefix mean?

0x marks a literal as hexadecimal in many programming languages, so 0xff is 255 in decimal. It is a notation hint rather than part of the value, so you can leave it off when you only need the bare digits.

Can it handle very large numbers?

Yes. The converter uses arbitrary-precision integers, so numbers far beyond 64 bits convert exactly with no rounding or overflow. The output simply grows as long as it needs to be.

Does it convert negative numbers or decimals?

No. It handles non-negative whole numbers only. A minus sign, a decimal point or any non-digit character after stripping commas and spaces produces an Invalid number message.

What happens if I clear the box?

Empty input returns an empty result rather than an error, so the output simply blanks out until you type a valid number again.

Is my data sent to a server?

No. The conversion runs entirely in your browser, so the numbers you enter never leave your device. To go the other way, use the hex to decimal tool, or convert to base 2 with decimal to binary.

Learn more

Related tools