How to use the Decimal to Hex Converter
- Type a decimal number.
- Read the hex result and copy it.
- Follow the divide by 16 table to see each remainder become a hex digit.
- Use the swap button to convert hex back to decimal.
About this tool
Convert decimal to hex and see every step of the working. Type a number such as 255, 4096 or 65535 and the hexadecimal value appears immediately – FF, 1000 and FFFF – with a table showing each division by 16 and its remainder.
To convert decimal to hexadecimal by hand, divide the number by 16 and write down the remainder. Divide the quotient by 16 again and repeat until you reach 0. The remainders, read from the bottom up, are the hex digits – with 10 to 15 written as A to F. For example, 419 ÷ 16 = 26 r 3, 26 ÷ 16 = 1 r 10 (A), 1 ÷ 16 = 0 r 1, so 419 is 1A3.
This is base 10 to base 16 conversion, which programmers need for colour codes, memory addresses, permissions and byte values. The converter also gives you the binary value, works with negative numbers and decimal fractions, and converts numbers far bigger than an ordinary calculator can handle without losing a digit. A reference table lists common values from 0 to 1024. To reverse the conversion, use Hex to Decimal.