Convert decimal to hex (base 10 → base 16)
Use this converter when you have decimal integers (base 10) and need their hexadecimal representation (base 16).
This page is a focused Decimal → Hex variant built for speed:
- Batch mode is enabled by default (one value per line)
- Hex output is UPPERCASE by default (
A–F) - Controls are intentionally hidden to keep this variant fast and distraction-free
Need other bases (binary/octal), prefixes, or formatting options? Open the full Number Base Converter.
How to use it
- Paste your decimal values into the input (left).
- Use one number per line.
- Copy the hex results from the output (right).
Signed values are supported:
-26→-1A+255→FF
Input rules (decimal)
Integers only
Valid examples:
015+15-15000123(leading zeros are fine)
Not supported:
3.141e612,345(remove commas)
Whitespace is okay
Extra spaces and empty lines are fine. In batch mode, each line is processed independently.
Output format (hex)
- Output uses digits
0–9and lettersA–F - Negative values keep a leading
- - No
0xprefix by default
Examples:
10→A15→F16→10255→FF4096→1000-26→-1A
Batch example (one per line)
Input (decimal):
10
255
4096
-26
3.14
Output (hex):
A
FF
1000
-1A
!ERROR: Decimal input may contain only digits 0–9
One invalid line won’t break the rest.
Common use cases
Debugging and IDs
Hex is common for IDs, hashes, memory addresses, and debugging output. Converting from decimal to hex helps you match what tools and logs display.
Colors and UI work
While CSS colors are usually written as hex (like FFAA00), sometimes your data or APIs provide values as decimal integers.
Bitmasks and low-level work
Hex is compact and maps nicely to binary (each hex digit = 4 bits), making it ideal for inspecting flags and bit patterns.
Troubleshooting
“Invalid digit for decimal”
Decimal input can contain only digits 0–9 and an optional leading + or -.
Remove commas, periods, and scientific notation.
Notes
- This is number base conversion for integers, not text/byte encoding.
- Everything runs locally in your browser — nothing is uploaded.