Convert Decimal to Hex
Convert decimal numbers to hexadecimal.
Base 16 value
FF
255 in base 10
Decimal
255
Binary
11111111
Hexadecimal
FF
Octal
377
Bit length
8 bits
Bytes needed
1
Each digit × 10 raised to its position from the right, summed.
| Digit | Value | Place | Contribution |
|---|---|---|---|
| 2 | 2 | 10^2 | 200 |
| 5 | 5 | 10^1 | 50 |
| 5 | 5 | 10^0 | 5 |
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.
Explore Related Workflows & Utilities
More tools in Developer Tools and related problem-solving tools
Direct Workflow Extensions
Convert hexadecimal numbers to decimal.
Convert numbers between binary, octal, decimal, hex and any base.
Convert decimal numbers to binary with the division steps.
Convert binary numbers to decimal with the working shown.
Convert RGB values to a hex colour code.
Convert between text and character codes in any base.
Complementary Utilities across Categories
Topical Deep Dives & Guides
Popular Related Searches for Decimal to Hex Converter
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.