Decimal ↔ Hex Converter

Binary:

This free online decimal to hex converter instantly translates whole numbers between base-10 and base-16. Whether you are writing low-level code, setting memory addresses, or converting color values, you can switch between decimal and hexadecimal in a single click while also seeing the binary equivalent.

How to Convert Decimal to Hex Manually

Decimal is a base-10 system using the digits 0 through 9, while hexadecimal is a base-16 system that adds the letters A through F for values 10 to 15. To convert a decimal number to hex by hand, repeatedly divide the number by 16 and record the remainder at each step, reading the remainders from last to first.

For example, converting 255 to hex: 255 ÷ 16 = 15 remainder 15. Since 15 in hex is written as F, the result is FF. Larger values follow the same pattern — 4096 decimal is 1000 in hex because 4096 equals 16³.

  • Divide the decimal number by 16 and note both the quotient and remainder.
  • Convert any remainder of 10-15 into the letters A-F.
  • Repeat with the quotient until it reaches zero.
  • Read the remainders in reverse order to build the final hex value.

How to Convert Hex to Decimal Manually

To convert a hexadecimal number back to decimal, multiply each digit by 16 raised to the power of its position, starting at zero from the right. Sum all the results to get the decimal value.

Take the hex value 2A as an example: A (10) sits in the 16⁰ position and 2 sits in the 16¹ position, so the calculation is (2 × 16) + (10 × 1) = 42. The same method works for values of any length, which is exactly what this hex to decimal converter does for you automatically.

Why Convert Between Decimal and Hex?

Developers encounter decimal-to-hex conversions in memory addressing, binary protocols, color codes, and debugging dumps. Hexadecimal is simply a more compact way to read binary data — each hex digit represents exactly four binary bits.

Use this decimal to hex converter whenever you need a quick, accurate translation, and rely on the binary output shown alongside to verify your result at a glance.