# Convert Decimal to Hexadecimal

> Convert decimal numbers to hexadecimal online. Free decimal to hex converter with a worked example — base 10 to base 16, one value per line.

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

Input:
```
10
255
4096
65535
```

Output:
```
a
ff
1000
ffff
```

## How to convert Decimal to Hex

1. Take your base-10 integer.
2. Repeatedly divide by 16, recording remainders as hex digits (10–15 become a–f).
3. Read the remainders bottom-up — 255 becomes ff.

## FAQ

### 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

- [Hex → Decimal](https://www.devkult.com/convert/hex-to-decimal.md)
- [Decimal → Binary](https://www.devkult.com/convert/decimal-to-binary.md)
- [HEX → RGB](https://www.devkult.com/convert/hex-to-rgb.md)

Open the interactive converter: https://www.devkult.com/convert/decimal-to-hex