Convert Decimal to Hexadecimal
Hexadecimal is the compact notation behind color codes, memory addresses, and byte values. This converter turns base-10 integers into their base-16 representation, one number per line.
Example · Decimal → Hex
Decimal input
10 255 4096 65535
Hex output
a ff 1000 ffff
How to convert Decimal to Hex
- Take your base-10 integer.
- Repeatedly divide by 16, recording remainders as hex digits (10–15 become a–f).
- Read the remainders bottom-up — 255 becomes ff.
Frequently asked questions
What is 255 in hexadecimal?
255 is ff, the largest value a single byte can hold. That is why color channels run from 00 to ff.
Should I add a 0x prefix?
The converter returns the bare digits. Add 0x (e.g. 0xff) when the context is code, or # for a CSS color.
Related converters