Decimal to Hexadecimal Converter
Type a decimal number of any length to see it in hexadecimal, with every step of the working.
Decimal to hexadecimal table
| Decimal | Hexadecimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 7 | 7 |
| 8 | 8 |
| 10 | A |
| 15 | F |
| 16 | 10 |
| 32 | 20 |
| 64 | 40 |
| 100 | 64 |
| 127 | 7F |
| 128 | 80 |
| 255 | FF |
| 256 | 100 |
| 1000 | 3E8 |
| 1024 | 400 |
Worked examples
10 in hexadecimal
10 (decimal)
A (hexadecimal)
Decimal value 10.
255 in hexadecimal
255 (decimal)
FF (hexadecimal)
Decimal value 255.
2026 in hexadecimal
2026 (decimal)
7EA (hexadecimal)
Decimal value 2026.
About Decimal to Hexadecimal Converter
This converter turns decimal numbers into hexadecimal and shows how. To convert decimal to hexadecimal, divide the number by 16 again and again, writing down each remainder, then read the remainders from last to first. For example, 10 in decimal is A in hexadecimal, and 2026 is 7EA.
Decimal is the base 10 system we count in every day, with place values of ones, tens, hundreds and so on. Hexadecimal packs four bits into each digit, which is why programmers use it for colours, memory addresses and raw data: it is far shorter than binary and converts to it directly. Numbers of any length are converted exactly, because the tool works with whole numbers digit by digit instead of rounding.
How to use Decimal to Hexadecimal Converter
- Type or paste a decimal number into the first box. Spaces, underscores and prefixes such as 0x are ignored.
- Read the hexadecimal result straight away in the second box, grouped for easier reading if you leave the box ticked.
- Look at the working table to see each step of the method.
- Copy the result, or use the swap button to convert hexadecimal back to decimal.
Common uses
- Reading colour codes such as #FF8800 in web design
- Reading memory addresses, error codes and MAC addresses
- Debugging data in a hex editor or a network capture
- Programming in languages that write numbers as 0x values
Frequently asked questions
How do I convert decimal to hexadecimal by hand?
Divide the number by 16 again and again, writing down each remainder, then read the remainders from last to first. The working table on this page shows exactly these steps for the number you type.
What is 255 in hexadecimal?
255 in decimal is FF in hexadecimal. In decimal it is 255, the largest number that fits in one byte.
What is 2026 in hexadecimal?
2026 in decimal is 7EA in hexadecimal.
Can it convert very large numbers?
Yes. Whole numbers with up to 4,096 digits are converted exactly. The working table shows the first rows when a number is very long.
Does it handle fractions or negative numbers?
Negative whole numbers are converted with their minus sign kept. Fractions are not supported, because many fractions that end in one base repeat for ever in another.