Decimal to Hex Converter
Convert decimal to hexadecimal instantly — type on the left and the result appears on the right. Everything runs in your browser, nothing is uploaded.
How to convert decimal to hex
To write a decimal number in hexadecimal, divide it repeatedly by 16 and read the remainders, using the letters A to F for the values 10 to 15.
Method: repeated division by 16, reading the remainders from last to first.
- Divide by 16 and note the remainderDivide the decimal number by 16 and write down the remainder.
- Repeat until you reach 0Keep dividing each quotient by 16, noting each remainder.
- Read the remainders (A–F for 10–15)Read the remainders from last to first, writing any value from 10 to 15 as A to F.
Examples 26 = 1A255 = FF
Decimal to Hex Table
Common decimal values with their hexadecimal equivalents.
| 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 |
| 20 | 14 |
| 32 | 20 |
| 50 | 32 |
| 64 | 40 |
| 100 | 64 |
| 128 | 80 |
| 255 | FF |
| 256 | 100 |
| 512 | 200 |
| 1000 | 3E8 |
Related conversions
Frequently asked questions
How do you convert decimal to hex?
Divide the number by 16, note the remainder (writing 10–15 as A–F), repeat with the quotient until it is 0, then read the remainders from last to first. 255 gives FF.
What is 255 in hex?
255 is FF, the largest value a single byte can hold.
What is 16 in hex?
16 in decimal is 10 in hex, because hex rolls over after F.