Decimal to Hexadecimal Converter
Convert decimal numbers to hexadecimal. Decimal values become hexadecimal for web colors, memory addresses, character codes and register values.
Decimal to Hexadecimal converter
Result
- Binary
- —
- Octal
- —
- Decimal
- —
- Hexadecimal
- —
How to convert decimal to hexadecimal
Divide the number by 16, write down the remainder, and repeat with the quotient until it reaches 0. Read the remainders from last to first to get the hexadecimal digits.
Example: 156 (decimal) to hexadecimal
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 16 | 9 | C |
| 9 ÷ 16 | 0 | 9 |
Remainders from last to first: 9C. So 156 = 9C in hexadecimal.
Examples
- 10 (decimal) = A (hexadecimal)
- 156 (decimal) = 9C (hexadecimal)
- 255 (decimal) = FF (hexadecimal)
- 1000 (decimal) = 3E8 (hexadecimal)
Decimal to Hexadecimal conversion table
| Decimal (base 10) | Hexadecimal (base 16) |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
| 16 | 10 |
| 20 | 14 |
| 32 | 20 |
| 50 | 32 |
| 64 | 40 |
| 100 | 64 |
| 127 | 7F |
| 128 | 80 |
| 255 | FF |
| 256 | 100 |
| 512 | 200 |
| 1000 | 3E8 |
| 1024 | 400 |
The table lists the same whole numbers for every pair of bases.
Frequently asked questions
- What is 255 in hexadecimal?
- 255 in decimal is FF in hexadecimal.
- How do I convert decimal to hexadecimal by hand?
- Divide the number by 16, write down the remainder, and repeat with the quotient until it reaches 0. Read the remainders from last to first to get the hexadecimal digits.
- What digits does decimal use?
- Decimal uses the digits 0 to 9. Decimal is the everyday number system for counting, money and measurement.
- What is hexadecimal used for?
- Hexadecimal writes bytes compactly: web colors (#FF8800), memory addresses, MAC addresses and character codes all use it.