You are offline. Tools you have opened before keep working.
Decimal to hex converter
Type a decimal number and get its hexadecimal value right away, in upper or lower case. Large IDs and 64 bit values are converted exactly, and negative numbers can be shown in two's complement.
Free and private. Everything runs in your browser, nothing is uploaded.
Report a problem
How it works
Type the numberEnter the value in the input box. Spaces and underscores between digits are ignored.
See the resultThe converted value appears right away, together with the other common bases.
Copy itPress Copy next to the result you need.
From decimal to hexadecimal
Hexadecimal uses sixteen digits, 0 to 9 and A to F. To convert by hand, divide by 16 and keep the remainders: 48879 gives 15, 14, 14, 11, which read backwards is BEEF. Two hex digits always make one byte, which is why hex is the usual way to write bytes, colors such as #FF8800, memory addresses and Unicode code points.
The converter handles numbers well beyond the 64 bit range without rounding. For negative values, turn on Signed and pick a width to get the two's complement form, for example -1 in 32 bits is FFFFFFFF. Turn off grouping if you want the digits without spaces when you copy them.
Frequently asked questions
Should I write 0x in front?
Many programming languages use 0x to mark hex numbers, for example 0xFF. The converter shows the digits without a prefix, and accepts input with or without it.
How do I convert decimal to binary by hand?
Divide the number by 2 again and again and write down the remainders, then read them from the last to the first. For 13: 13, 6, 3, 1 give remainders 1, 0, 1, 1, so 13 is 1101.
Why does 0.1 never end in binary?
Because 1/10 cannot be written as a sum of powers of two, just as 1/3 never ends in decimal. The repeating part 0011 is shown in brackets.
What is the largest number I can convert?
Numbers with up to 20,000 digits are accepted. The results are exact, there is no rounding.