Decimal to Hexadecimal Converter
Convert decimal (base 10) numbers to hexadecimal (base 16) instantly with step-by-step explanation. Essential for programmers, web developers, and students.
Quick Reference — Decimal to Hex Table
| Decimal | Hex | Decimal | Hex | Decimal | Hex |
|---|---|---|---|---|---|
| 0 | 0 | 6 | 6 | 12 | C |
| 1 | 1 | 7 | 7 | 13 | D |
| 2 | 2 | 8 | 8 | 14 | E |
| 3 | 3 | 9 | 9 | 15 | F |
| 4 | 4 | 10 | A | 16 | 10 |
| 5 | 5 | 11 | B | 255 | FF |
What is Hexadecimal (Hex)?
The hexadecimal system (base 16) uses 16 symbols: digits 0–9 and letters A–F. A=10, B=11, C=12, D=13, E=14, F=15. It is widely used in computing because one hex digit maps perfectly to 4 binary bits (a nibble), making it a compact and human-readable way to represent binary data.
How to Convert Decimal to Hex Step by Step
Divide the decimal number by 16 repeatedly, recording remainders. Replace remainders ≥10 with A–F. Read remainders bottom-up.
Example: Convert 254 to hex 254 ÷ 16 = 15 remainder 14 → E ← LSD 15 ÷ 16 = 0 remainder 15 → F ← MSD Result (bottom to top): FE
Hex in Web Development
HTML/CSS color codes use hexadecimal: #RRGGBB. Each pair represents Red, Green, Blue from 00 (0) to FF (255). For example, #FF0000 is pure red. Memory addresses in programs are shown in hex: 0x1A2B3C4D. Understanding hex is essential for web developers, network engineers, and embedded programmers.