Decimal to Hex Converter
Use this online converter to easily convert decimals to hexadecimal numbers.
Conversion of decimals to hex numbers
Hexadecimals, or hex numbers, are used primarily in computer engineering since programming code and character tables like Unicode are often represented as numbers in the hexadecimal system (base 16). Decimals (base 10) are used widely in everyday life, science, accounting, and so on. Sometimes a conversion from decimal to hex representation of a number is needed to facilitate writing code, referencing a character, etc.
Conversion of the numbers of 0 to 9 is straightforward since these are the same in both systems. For decimals from 10 to 15 see the reference table below. For larger numbers the process is more complex and is explained below.
How to convert decimal to hex
Let us denote the number we want to convert from decimal to hex by X. The first step is to find the largest power of 16 ≤ X and denote it by E. Then, determine how many times the power of 16 found above goes into X, denote it by Z1. Denote the remainder by Y1.
Repeat the above steps using Yn as a starting value until 16 is larger than the remaining value and assign the remainder to the 160 position, then assign each of the values Y1...n to its respective position and you will have your hex value.
Example dec to hex conversion: Convert 1000 in decimal to hex.
1.) Largest power E = 2 (162 = 256 ≤ 1000, 163 = 4,096 ≥ 1000)
2.) Z1 = 1000 / 162 = 3 (232 remainder); Y1 = 232
3.) Largest power E = 1 (161 = 16 ≤ 232, 162 = 256 ≥ 232)
4.) Z2 = 232 / 161 = 14 (8 remainder); Y2 = 8
5.) 8 < 16; Z3 = 8, end.
Combine Z1..n to get 3E8 (14 dec = E hex).
As you can see, the above process can be fairly tedious to do manually if the number is larger, therefore we recommend using our free online converter instead, when available.
Decimal to hex conversion table
Cite this converter & page
If you'd like to cite this online converter resource and information as provided on the page, you can use the following citation:
Georgiev G.Z., "Decimal to Hex Converter", [online] Available at: https://www.gigacalculator.com/converters/convert-decimal-to-hex.php URL [Accessed Date: 21 Jul, 2019].