Convert Decimal to Hexadecimal (Base-16) Online
Easily convert base-10 decimal numbers to standard hexadecimal strings. Our free online Decimal to Hex Converter helps developers, programmers, and students convert memory addresses, hex color codes, and byte values instantly. Perform real-time, client-side conversions of any integer length.
The Division-by-Sixteen Method
Positional conversions to base-16 use the division-by-sixteen algorithm. You divide the decimal integer by 16 and record the remainder. Any remainder from 10 to 15 is translated into letters A through F. Once the quotient reaches 0, the remainders are read in reverse order to produce the hex string.
How to Convert Decimal to Hex (Step-by-Step)
- Divide: Divide your decimal number by 16 and note the quotient and remainder.
- Map Letters: If the remainder is 10-15, convert it to the corresponding letter:
- 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F
- Repeat: Divide the new quotient by 16, keeping track of remainders. Stop when you reach a quotient of 0.
- Assemble: Write the remainders in reverse order (from bottom to top) to produce the hex string.
Large Integers
Uses high-precision BigInt arithmetic, allowing you to convert massive decimal integers without precision loss.
Developer Formatting
Toggle output prefixes (0x) and switch output casing between UPPERCASE and lowercase depending on your code style.
100% Secure
Conversions execute locally inside your browser, ensuring no data ever leaves your device.
Decimal to Hex Reference Index
| Decimal Value | Hexadecimal Value |
|---|---|
| 1 | 01 |
| 10 | 0A |
| 15 | 0F |
| 32 | 20 |
| 65 | 41 |
| 100 | 64 |
| 255 | FF |