Decimal to Hex Converter

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

  1. Paste your decimal values into the input (left).
  2. Use one number per line.
  3. Copy the hex results from the output (right).

Signed values are supported:

  • -26-1A
  • +255FF

Input rules (decimal)

Integers only

Valid examples:

  • 0
  • 15
  • +15
  • -15
  • 000123 (leading zeros are fine)

Not supported:

  • 3.14
  • 1e6
  • 12,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–9 and letters A–F
  • Negative values keep a leading -
  • No 0x prefix by default

Examples:

  • 10A
  • 15F
  • 1610
  • 255FF
  • 40961000
  • -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.

Frequently Asked Questions

Yes. Use a leading minus sign (−) or plus sign (+) and the sign is preserved in the output.

Yes. This variant runs in batch mode by default: paste one decimal integer per line and get one hex result per line.

Uppercase by default (A–F). This variant is meant to be quick and consistent, so formatting controls are hidden.

No. Output is plain hex digits (0–9, A–F) with an optional leading '-' for negatives.

No. All conversions run locally in your browser.

Try one of our format-specific converters below

Explore Our Tools

Read More From Our Blog