Decimal to Hex Converter

10

Whole numbers of any size, including negatives. Calculated exactly in your browser.

Hexadecimal result
07 EA 16
Repeated division by 16

Enter a decimal number to get its hexadecimal form and the remainders (0–15, written 0–F) that produce it.

Divide by 16, keep the remainders

Decimal to hexadecimal uses the same method as decimal to binary, with 16 as the divisor. Remainders 10 to 15 are written A to F.

StepDivisionRemainder
12026 ÷ 16 = 12610 → A
2126 ÷ 16 = 714 → E
37 ÷ 16 = 07

Reading the remainders from the bottom up gives 7EA. Two hex digits make one byte, which is why the output is grouped in pairs: 65535 is FF FF, two bytes of all ones.

When the result has an odd number of hex digits, the converter pads the first byte with a zero. For 2026, it displays 07 EA. The leading zero preserves the value and makes the two byte boundaries visible.

Where you will use it

Related guides

FAQ

Frequently Asked Questions

How do you convert decimal to hex?
Divide by 16 and keep the remainder; remainders 10–15 are written A–F. Repeat with the quotient until it is 0, then read the remainders bottom to top. 2026 → 2026 ÷ 16 = 126 r 10 (A), 126 ÷ 16 = 7 r 14 (E), 7 ÷ 16 = 0 r 7 → 7EA.
What is 255 in hex?
FF. 255 = 15 × 16 + 15.
Why is hex used for colors?
Each RGB channel is one byte (0–255), and one byte is exactly two hex digits, so #FF8800 reads as red FF, green 88, blue 00.
Copied to clipboard!