Decimal to Hex Converter
Type a non-negative whole number to get its hexadecimal value instantly. Toggle uppercase digits or a 0x prefix. Large numbers stay exact and nothing leaves your browser.
How to convert decimal to hex
- Enter a non-negative whole number. Commas and spaces are ignored.
- Optionally turn on uppercase letters or the 0x prefix.
- Copy the hexadecimal result.
Examples
Byte value
255
ff
With 0x prefix
4096
0x1000
Frequently asked questions
How does decimal to hex conversion work?
Decimal is base 10 and hexadecimal is base 16. The number is repeatedly divided by 16, and each remainder maps to a hex digit (0-9 then a-f), read from last to first.
What is hexadecimal used for?
Hex is a compact way to write binary. Two hex digits cover one byte, so it shows up in colors (#ff8800), memory addresses, byte dumps, hashes and machine code.
What is the difference between uppercase and lowercase hex?
They mean the same value. ff and FF are equal. Lowercase is common in code and CSS, while uppercase often appears in hardware docs and hash output. Pick whatever your context expects.
What does the 0x prefix mean?
0x marks a literal as hexadecimal in many languages, so 0xff is 255 in decimal. It is a notation hint, not part of the value, so you can turn it off if you only need the digits.
Can it handle very large numbers?
Yes. The converter uses arbitrary-precision integers, so even numbers far larger than 64 bits convert exactly with no rounding.
Is my data sent to a server?
No. The conversion runs entirely in your browser, so the numbers you enter never leave your device.
Related tools
Hex to Decimal
Convert hex to decimal online. Paste a hexadecimal value, with or without a 0x prefix, and get the exact base 10 number. Runs in your browser.
Decimal to Binary
Convert decimal numbers to binary online. Type a whole number and get its base-2 value instantly, even for very large numbers. Runs in your browser.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.
Binary to Hex
Convert binary to hexadecimal online. Paste a binary number and get exact hex, with optional uppercase. Handles huge values. Runs in your browser.
Celsius to Fahrenheit
Convert Celsius to Fahrenheit instantly. Type a temperature in C and get F, with the formula and a quick reference table. Runs in your browser.
Centimeters to Inches
Convert centimeters to inches instantly. Type a length in cm and get inches, with the formula and a quick reference table. Runs in your browser.