Decimal to hexadecimal
Type a value in dec to get it in hex instantly.
FFhex
That's about the same as a byte. That needs 8 bits to store.
Convert the other way: hex to dec
What it means
How big is that?
Whole numbers only. Anything after the decimal point is rounded away.
The math
How to convert dec to hex
Base b: each digit is worth b times the one to its right. Gray code = n XOR (n ÷ 2); BCD writes each decimal digit as four bits.
Example: 255 dec = FF hex.
Every unit
Your number in every base
Tables
dec to hex conversion table
| dec | hex |
|---|---|
| 1 dec | 1 hex |
| 2 dec | 2 hex |
| 4 dec | 4 hex |
| 8 dec | 8 hex |
| 10 dec | A hex |
| 15 dec | F hex |
| 16 dec | 10 hex |
| 31 dec | 1F hex |
| 32 dec | 20 hex |
| 64 dec | 40 hex |
| 100 dec | 64 hex |
| 128 dec | 80 hex |
| 255 dec | FF hex |
| 256 dec | 100 hex |
| 512 dec | 200 hex |
| 1,000 dec | 3E8 hex |
| 1,024 dec | 400 hex |
hex to dec conversion table
| hex | dec |
|---|---|
| 1 hex | 1 dec |
| 2 hex | 2 dec |
| 4 hex | 4 dec |
| 8 hex | 8 dec |
| A hex | 10 dec |
| F hex | 15 dec |
| 10 hex | 16 dec |
| 1F hex | 31 dec |
| 20 hex | 32 dec |
| 40 hex | 64 dec |
| 64 hex | 100 dec |
| 80 hex | 128 dec |
| FF hex | 255 dec |
| 100 hex | 256 dec |
| 200 hex | 512 dec |
| 3E8 hex | 1,000 dec |
| 400 hex | 1,024 dec |
Quick answers
Quick answers
- How many hex is 1 dec?
- 1 dec is 1 hex.
- How many hex is 10 dec?
- 10 dec is A hex.
- How many hex is 255 dec?
- 255 dec is FF hex.
The units
About these units
Decimal (dec)
Base ten, the everyday counting system, using digits 0 to 9.
Hexadecimal (hex)
Base sixteen, digits 0 to 9 then A to F. Colors, memory addresses and byte dumps use hex.
Keep going