Decimal to Hex Converter

Enter any decimal number into the Decimal to Hex Converter and get its hexadecimal (base-16) equivalent immediately. You'll see the hex result in uppercase, along with the binary representation and a step-by-step division breakdown showing how the conversion was performed.

Enter a non-negative integer to convert to hexadecimal.

Results

Hexadecimal Result

--

Binary Representation

--

Octal Representation

--

Number of Hex Digits

--

Results Table

Frequently Asked Questions

What is decimal to hexadecimal conversion?

Decimal to hexadecimal conversion is the process of expressing a base-10 number (using digits 0–9) in base-16 notation (using digits 0–9 and letters A–F for values 10–15). For example, the decimal number 255 converts to FF in hexadecimal. Each hex digit represents exactly four binary bits, making hex a compact way to express binary data.

Why is hexadecimal used in computing?

Hexadecimal is widely used in computing because it maps cleanly to binary — each hex digit represents exactly 4 bits (a nibble). This makes it far more concise than binary while still being easy to convert. You'll encounter hex in memory addresses, color codes (#RRGGBB), error codes, and network MAC addresses.

How do I convert decimal to hex manually?

To convert manually, repeatedly divide the decimal number by 16 and record the remainder at each step. Remainders of 10–15 are written as A–F. Once the quotient reaches 0, read the remainders in reverse order to get the hex result. For example, 255 ÷ 16 = 15 remainder 15 (F), then 15 ÷ 16 = 0 remainder 15 (F), giving FF.

What are the hexadecimal digits and what do they represent?

Hexadecimal uses 16 symbols: 0–9 represent values zero through nine, and A, B, C, D, E, F represent values 10, 11, 12, 13, 14, and 15 respectively. Each position in a hex number represents a power of 16, so the rightmost digit is 16⁰ (1s place), the next is 16¹ (16s place), and so on.

What is the largest decimal number this converter handles?

This converter handles non-negative integers within the safe integer range of JavaScript (up to 2⁵³ − 1, or 9,007,199,254,740,991). For very large numbers beyond 64-bit integer range, specialized big-integer libraries would be required. Most practical use cases — such as IP addresses, color codes, and memory values — fall well within this range.

What are common misconceptions about decimal to hex conversion?

A common misconception is that hex numbers like 'FF' or 'AB' are letters rather than numeric values — they are simply digit symbols for 15 and 11 respectively. Another misconception is that hex is only used for colors; in reality it appears throughout low-level programming, networking, and hardware configuration. Hex is not a different type of number, just a different way of writing the same value.

How does this tool show the conversion steps?

The step-by-step table below the result shows each division-by-16 iteration: the starting dividend, the integer quotient, and the remainder in both decimal and hex form. Reading the hex remainders from the bottom of the table upward gives you the final hexadecimal number, which matches the result shown at the top.

How do I convert hex back to decimal?

To convert hexadecimal back to decimal, multiply each hex digit by 16 raised to its positional power and sum the results. For example, hex 2D = 2×16¹ + 13×16⁰ = 32 + 13 = 45. You can use our Hex to Decimal Converter to do this automatically.

More Math Tools