Decimal to hexadecimal converter
Convert decimal to hexadecimal with BigInt, upper/lowercase output and padding. Includes binary and octal equivalents plus a step-by-step division table.
Online decimal to hexadecimal calculator (with steps)
Convert any decimal number to hexadecimal with BigInt, also get binary and octal, and review the automatic successive division table.
If provided, we left-pad with zeros up to the specified number of hexadecimal digits (each digit is 4 bits).
Hexadecimal
—
Clean decimal
—
Binary
—
Octal
—
Automatic steps: successive divisions by 16
| Step | Quotient | Remainder | Build |
|---|
How to convert decimal to hexadecimal
- Normalize the input. Remove spaces and underscores, keep the sign, and validate only decimal digits remain.
- Separate the sign. Work with the absolute value and keep whether it was negative to add back later.
- Divide successively by 16. Each step uses the quotient for the next division and the remainder (0–15) becomes a hex digit via 0–9 and A–F.
- Build the result. Read the remainders in reverse order (last to first); if the number was 0, the output is 0.
- Tune the format. Apply upper/lowercase, add 4-bit-multiple padding if needed, and reattach the original sign.
10 → A
15 → F
31 → 1F
2024 → 7E8
65535 → FFFF
-255 → -FF
Frequently asked questions
We accept integers with optional sign and separators in whitespace or underscores. Separators are removed before calculation; fractional parts or exponents are not supported.
If you enter a number, we left-pad with zeros up to that width of hexadecimal digits. Each digit is 4 bits, useful for bytes (2), words (4), or long addresses.
The negative sign is added back after the conversion (we do not use two's complement). You can choose uppercase or lowercase for A–F in the advanced options.
We use BigInt so we handle very large integers. For the steps table we show up to 512 divisions to keep it readable.
Yes, each block includes a quick-copy button. If your browser blocks programmatic copy, we will show a notice and you can still select the text manually.