Decimal to HEX Converter

Convert decimal to hexadecimal. Useful for color codes, debugging, memory addresses, and binary protocols.

Converter
Direct answer

Enter a decimal number — its hexadecimal representation appears below. 255 → FF, 256 → 100, 16777215 → FFFFFF.

Ad
Decimal input
HEX output

About Decimal → HEX

You'll convert decimal to hex any time you need to specify a color (CSS uses hex by default), inspect memory in a debugger, write a binary file format, or work with low-level networking protocols. Hex is base-16, packing two digits per byte.

Ad

Frequently asked questions

Why is FF the largest two-digit hex value?
F = 15, so FF = 15×16 + 15 = 255. Two hex digits map exactly to one byte (0-255), which is why hex is the natural representation of byte data.
Are leading zeros preserved?
In CSS colors, yes — write #00FF00, not #0FF00. This converter outputs the minimum digits; pad to multiples of 2 yourself if needed.

Related tools