Decimal to Hexadecimal Converter

Result:

How the conversion works

The tool repeatedly divides your decimal number by 16 and reads the remainders, using JavaScript's built-in Number.toString(16) rather than a hand-rolled loop. Hexadecimal digits go 0-9 then A-F for values 10-15.

Worked example

Enter 255. 255 ÷ 16 = 15 remainder 15 (F); 15 ÷ 16 = 0 remainder 15 (F). Reading the remainders bottom-up gives FF — the maximum value a single byte can hold, which is why you'll see FF used as shorthand for "fully on" in RGB color codes like #FFFFFF.

A few more reference values

DecimalHex
10A
1610
10064
40961000
65535FFFF

Where this shows up

Hex notation is dense enough that programmers use it for memory addresses, Unicode code points, and CSS color values instead of decimal or binary. Note this tool takes whole numbers only — decimals and negative signs aren't parsed by the underlying parseInt call, so entering "255.5" is treated as 255.