Decimal to Hex
Decimal to hex converts one decimal number, including a fractional part, with calculation steps.
Default: up to 32 hexadecimal fractional digits, truncated toward zero if needed. Terminating results stop earlier. Integer digits are not truncated.
Calculation steps
Frequently asked questions
How do I convert decimal to hex?
Enter one decimal number and select Convert to hex. Divide the integer part by sixteen repeatedly, then read the remainders from bottom to top. For a fractional part, multiply it by sixteen repeatedly and read the integer digits from top to bottom. Remainders 10–15 are written as A–F. Open Calculation steps to see the operations for your input.
Does this decimal to hex calculator accept fractions?
Yes. Use a point, such as 13.625, rather than a comma. A leading or trailing point is accepted if at least one digit is present. A fractional hexadecimal expansion may continue indefinitely; the selected maximum controls how many fractional digits this page displays.
What does a fraction look like in hex?
13.625 produces D.A. The integer remainders produce D; multiplying the fractional part by sixteen produces A, then the remainder reaches zero. In contrast, 0.1 has a repeating hexadecimal expansion and is truncated at the chosen limit.
How many fractional places does the converter keep?
The default maximum is 32 hexadecimal fractional digits. You can choose 16 or 64 instead. If a nonzero remainder remains at that limit, the result is truncated toward zero without rounding, and the status says so. If the remainder becomes zero earlier, calculation stops at that point. The limit applies to fractional digits only.
Can I enter negative numbers, spaces or scientific notation?
Yes. Use an optional leading plus or minus sign. Whitespace groups one number and is removed, so 1 3.6 2 5 means 13.625, not a batch. Scientific notation such as 1.5e2 is accepted. Commas, binary prefixes, octal prefixes, hexadecimal prefixes and other characters are rejected. Invalid input clears the previous result.
What are the input limits?
This decimal to hex converter accepts one number per run, up to 1,000 decimal digits before the exponent and 10,000 total input characters including whitespace. The exponent must be between -1000 and 1000. These are this tool's limits. It uses integer arithmetic on the decimal text instead of first converting the input to a floating-point number.
Is this a text or file converter?
No. This page changes the representation of one numeric value. Hexadecimal output uses uppercase digits A–F without a 0x prefix; negative values use a leading minus sign, not fixed-width two’s complement. It does not decode text, interpret file bytes or apply a fixed-width machine-word format. For hexadecimal input and a decimal integer result, use Hex to Decimal. That page retains its integer-only reverse mode for decimal to hex; this page adds decimal fractions and calculation steps. For other output bases use Decimal to Binary or Decimal to Octal.
Do I need an account or upload anything?
No. Calculation and copying run locally in your browser. There is no batch mode or saved conversion history, and the tool does not transmit your input.
For hexadecimal input and octal output, use Hex to Octal.