How to convert decimal to hexadecimal
Divide the decimal number by 16 repeatedly, writing down each remainder. Read the remainders from the last to the first.
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 16 | 9 | C |
| 9 ÷ 16 | 0 | 9 |
Reading the remainders upward gives 156₁₀ = 9C₍16₎.
About the number systems
Decimal
Base 10 is the everyday number system with digits 0–9; each position is worth ten times the one to its right.
Hexadecimal
Base 16 uses 0–9 and A–F (A = 10 … F = 15). One hex digit is exactly four bits, so two hex digits describe a byte — used for colours (#FF8800), memory addresses and checksums.
Decimal to hexadecimal table
| Decimal | Hexadecimal |
|---|---|
| 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 |
| 31 | 1F |
| 32 | 20 |
| 63 | 3F |
| 64 | 40 |
| 100 | 64 |
| 127 | 7F |
| 128 | 80 |
| 255 | FF |
| 256 | 100 |
| 1000 | 3E8 |
| 1024 | 400 |
| 4096 | 1000 |
| 65535 | FFFF |
Frequently asked questions
How do I convert decimal to hexadecimal?
Divide the decimal number by 16 repeatedly, writing down each remainder. Read the remainders from the last to the first. Converting 156 to hexadecimal Division Quotient Remainder 156 ÷ 16 9 C 9 ÷ 16 0 9 Reading the remainders upward gives 156₁₀ = 9C ₍16₎.
What is 255 in hexadecimal?
255 (decimal) = FF in hexadecimal.
Can I convert very large numbers?
Yes. The converter uses exact big-integer arithmetic, so there is no rounding even for long inputs.