Decimal to Hex Converter
Convert a decimal number to hexadecimal.
Updated
This tool runs in your browser. No account or signup is required.
Common Decimal to HEX tasks
Developers typically reach for this page when they need to convert decimal to hexadecimal online; turn 255 into FF; convert a base 10 number to hex. The tool is built for quick, practical work rather than a generic demo.
What matters in a decimal to hex workflow
When developers compare online tools for this job, the useful capabilities tend to center on division steps, 0x form, binary/octal, large values. This page keeps those practical needs in mind while linking to related tools when a different workflow is a better fit.
What is Decimal to HEX?
Decimal to HEX converts a whole number from one base to another using the From and To base selectors. Letters in the result are uppercase.
What problem does it solve?
Bit masks, memory addresses, color codes and permissions all show up in different bases, and converting by hand is slow and error-prone.
How to use Decimal to HEX
- Set the From and To bases.
- Type your number.
- Copy the converted value.
Example
Input
255 (from base 10 to base 16)
Output
FF
What you can do with Decimal to HEX
- Decimal to hex
- Convert decimal to hexadecimal
- What is 255 in hex?
Common use cases
- Reading bit flags and masks
- Converting hex values from a debugger or a spec
- Learning how number bases relate
Related developer tasks
- Decimal to hex
- Convert decimal to hexadecimal
- What is 255 in hex?
How to convert decimal to hex
Divide by 16 repeatedly and write the remainders as hex digits, then read them from last to first.
255 / 16 = 15 r 15 -> F, F Result: FF 4095 = FFF
Decimal to hex in this tool
- Set From to Decimal (10) and To to Hex (16), then type your number.
- The result is uppercase and has no 0x prefix.
- To turn RGB channel values into a color code, use the RGB to HEX converter.
Related: Hex to Decimal, RGB to HEX Converter, Number Base Converter
Decimal to HEX FAQ
What if I see "Invalid number for base"?
The input has a character that does not exist in the From base, for example a 2 in a binary number.
Are fractions supported?
The tool works on whole numbers. Anything after a decimal point is ignored.
Does it add the 0x prefix?
No. Add 0x yourself if your code needs it.
Related Developer Tools
- HEX to Decimal Text & Data
- Number Base Converter Text & Data
- Decimal to Binary Text & Data
- RGB to HEX Web Tools
- HEX to RGB Web Tools
Looking for something else? Browse all developer tools.

