Convert Decimal to Hex
Convert decimal numbers to hexadecimal.
Decimal to Hex Converter
Developer tool running locally in browser
What does Decimal to Hex Converter do?
Convert decimal to hexadecimal with the repeated-division working shown, and optional padding to a byte width. Binary and octal are shown alongside for reference.
How to Use Decimal to Hex Converter
- 1Enter a decimal numberAny whole number.
- 2Choose the case and paddingOptional formatting.
- 3Read the hex valueWith the working below.
Key Features
- Repeated-division working shown
- Uppercase and lowercase output
- Optional padding to 2, 4, 8 or 16 digits
- Binary and octal shown alongside
- Exact for arbitrarily large integers
Frequently Asked Questions
How do I convert decimal to hex by hand?
Divide by 16 repeatedly and record each remainder, converting remainders 10–15 to A–F. Reading them bottom to top gives the hex value. 255 gives 15 and 15, so FF.
Should I use uppercase or lowercase?
Either is valid. Uppercase is conventional for constants, colour codes and documentation; lowercase is common in URLs, hashes and Unix tooling. Be consistent within a codebase.
Why pad to two digits?
Because a byte is always two hex digits. Writing 15 as 0F rather than F keeps byte dumps aligned and makes the value’s size unambiguous.
What is 255 in hex?
FF — the maximum value of a single byte, which is why it appears in colour codes such as #FFFFFF for white and in subnet masks.
Input is processed in your browser and never transmitted. That said, treat any web page as untrusted for live production secrets — rotate anything you paste anywhere.
Related Tools
Hex to Decimal Converter
Convert hexadecimal numbers to decimal.
Number Base Converter
Convert numbers between binary, octal, decimal, hex and any base.
Decimal to Binary Converter
Convert decimal numbers to binary with the division steps.
Binary to Decimal Converter
Convert binary numbers to decimal with the working shown.
