About
Decimal to hexadecimal converter: fast, exact and explained
Hexadecimal numbers are everywhere in computing, from memory addresses and colour codes to error codes and file formats. This free decimal to hexadecimal converter turns any decimal number into its hexadecimal equivalent the moment you type it. It also converts hexadecimal to decimal, and handles binary and octal in any direction. Every result comes with the working, so you can see exactly how the answer was reached instead of just trusting it.
How to convert decimal to hexadecimal
Going from decimal to hexadecimal uses repeated division. Divide the number by 16 and note the remainder, then divide the quotient by 16 again until it reaches zero. Reading the remainders from bottom to top gives the hexadecimal value, with remainders of 10 to 15 written as the letters A to F. For example, 47 ÷ 16 = 2 remainder 15, and 2 ÷ 16 = 0 remainder 2, so 47 is 0x2F. The converter does this for you and lists every division in the “See the working” panel, so 419 turns into 0x1A3 in three clear lines.
Worked example: 419 to hexadecimal
419 ÷ 16 = 26 remainder 3
26 ÷ 16 = 1 remainder A
1 ÷ 16 = 0 remainder 1
Read bottom to top: 419 = 0x1A3Decimal to hexadecimal conversion table
Use this decimal to hexadecimal table as a quick decimal to hexadecimal chart for common values, from 0 to 65,535.
| 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 |
| 32 | 20 |
| 64 | 40 |
| 100 | 64 |
| 127 | 7F |
| 128 | 80 |
| 255 | FF |
| 256 | 100 |
| 512 | 200 |
| 1,000 | 3E8 |
| 1,024 | 400 |
| 4,096 | 1000 |
| 65,535 | FFFF |
How to convert hexadecimal to decimal
To go the other way, number the hexadecimal digits from the right starting at 0, multiply each digit by 16 raised to that position, and add the results. 0x1A3 becomes 1 × 256 + 10 × 16 + 3 = 419. Choose From Hexadecimal, To Decimal, or open the dedicated hexadecimal to decimal page, to see every step.
Binary and octal conversions
Each hexadecimal digit stands for exactly four binary bits, which is why programmers use hexadecimal as a compact way to write binary: 0xFF is 1111 1111. Octal groups bits in threes instead, so0o777 is 111 111 111, or 511 in decimal. You can convert decimal to binary or octal, convert binary to hexadecimal, and every answer is also shown in all four bases at once.
Who uses a decimal to hexadecimal converter?
Software developers turn decimal values into hexadecimal for memory addresses, bit masks, register values and error codes. Web designers convert RGB values such as 255, 128 and 0 into the hexadecimal colour#FF8000. Students meet hexadecimal in computer science, digital electronics and networking courses, where showing the working matters as much as the answer. Whatever the reason, typing a number and seeing the hexadecimal straight away saves time and avoids the small slips that come from dividing long numbers by hand.
Common decimal to hexadecimal values
A few values come up again and again. 255 is 0xFF, the largest single byte, and 256 is0x100. 65,535 is 0xFFFF, the largest 16-bit number, and 2,147,483,647 is0x7FFFFFFF, the largest signed 32-bit integer. Knowing these by heart makes it easier to spot limits and overflows in code.
Exact results for very large numbers
Many calculators lose precision with large numbers because they store values as floating point. This converter uses exact whole-number arithmetic, so 18,446,744,073,709,551,615 converts to0xFFFFFFFFFFFFFFFF with every digit correct. Negative numbers work too, and longer values, like 128-bit identifiers, convert the same way.
Free, private and simple
The decimal to hexadecimal converter is free and needs no sign-up or download. It works on phones, tablets and computers, accepts numbers with commas or spaces, and lets you paste values straight from code. All conversions run in your browser, so the numbers you type are never sent to a server.