Hex Converter
Enter a whole decimal value in the Decimal field and read the Hex line as it updates. The converter truncates toward zero, then formats the integer as uppercase hexadecimal for quick checks while you debug or study bases.
Updated 2026-08-03 · math
About this tool
This hex converter reads one Decimal input. When the value is a finite number it truncates it and calls base-16 conversion with uppercase letters A–F. Non-numeric input shows Enter a number instead of a hex string. Negative values keep a leading minus in the hex output.
How to use
- Open the converter: Load this page so the Decimal field and Hex result line appear.
- Type a decimal number: Enter an integer such as 255 in the Decimal box.
- Read the hex output: When the input is valid, the result shows Hex: followed by uppercase digits.
- Fix invalid input: If you see Enter a number, replace letters or blanks with a finite numeric value.
Common use cases
- Convert a color channel or register value from decimal into hex while reading docs.
- Check homework answers that ask for hexadecimal of a decimal integer.
- Confirm bitmask sizes by seeing the hex digits of a decimal constant.
Tips
- Only the integer part is converted; fractions are truncated before hex formatting.
- Letters in the hex result are uppercase, such as FF for decimal 255.
FAQ
Does it convert hex back to decimal?
No. This page only converts decimal input into uppercase hexadecimal.
What happens to decimal fractions?
The value is truncated toward zero before conversion, so 255.9 becomes FF.
Why do I see Enter a number?
The Decimal field is empty or not a finite number, so no hex string is shown.
Is conversion done on a server?
No. The number is converted in your browser as you type.