Free Decimal to Hex Converter

Paste decimal numbers, press Convert to Hex and get exact hexadecimal back. Separate numbers with a space or a new line. Free, no account needed.

Words Limit/Search : 100
Upto 1,000 Words Sign up free

Upload File

What Is a Decimal to Hex Converter?

Quick answer: A decimal to hex converter (decimal to hexadecimal, base 10 to base 16) writes a whole number in positional notation with radix 16, using the digits 0 to 9 and a to f. Paste numbers above and press Convert to Hex; try it, and 255 comes back as ff.

It gave an exact conversion at all sizes we tested, up to about 200,000 characters, as a hex string.

How to Convert Decimal to Hex With This Tool

  1. Add numbers. Type or paste them into the Enter or paste your Decimal box, or choose a .txt file with Upload File.
  2. Separate them. Use a space, tab, new line, semicolon or a comma plus space. A comma inside a number, as in 1,000, is refused.
  3. Press Convert to Hex. The Result appears.
  4. Take it. Copy to Clipboard, or Save as TXT.

Tip: a pasted column comes back as one line. Guests get 100 entries per conversion, a free account 1,000.

Decimal to Hex Examples

DecimalHexWhat it shows
10aFirst letter digit
255ffLargest byte
4096100016 cubed
16777215ffffffWhite color code
4294967295ffffffffLargest unsigned 32-bit integer
42949672961000000002 to the power 32

Try your numbers, or split that white into channels with the RGB to Hex converter.

How to Convert Decimal to Hex by Hand

Divide by 16, note the remainder, and repeat on the quotient until it is 0. The first remainder is the least significant digit, and 10 to 15 become a to f.

  1. 1000 / 16 = 62, remainder 8.
  2. 62 / 16 = 3, remainder 14, written e.
  3. 3 / 16 = 0, remainder 3. The quotient is 0, so stop.

Read upward: 3, e, 8, so 1000 is 3e8. Check with powers of 16: 3 x 256 + 14 x 16 + 8 = 768 + 224 + 8 = 1000. Python's hex() function returns 0x3e8 for 1000; this tool returns 3e8, the same digits without the prefix.

What the Converter Does and Does Not Do

GMP (GNU Multiple Precision Arithmetic Library) integer math runs on our server, so a big integer keeps arbitrary precision and all 60 digits of a 60 digit input. Leading zeros drop (007 gives 7). One invalid entry converts nothing.

It refuses negative numbers, floating point fractions, scientific notation like 1e3 and a thousands separator. There is no uppercase option, 0x prefix or padding. The output matches Python's format(n, 'x'). A plain JavaScript number, as used by JavaScript toString(16), loses precision above 2 to the power 53, a rounding error. This tool does not.

Fixing the "cannot be converted" Message

The message begins: "-255" cannot be converted. It names the first bad value and keeps your text. Remove the minus sign, decimal point, comma, 0x and letters.

Limits and Text File Upload

Upload File takes one .txt file; typed text wins. Input over about 200,000 characters is refused.

Related Number Converters

The hex to binary guide covers each nibble (four bits), and how hexadecimal notation works the theory.

Last updated

Frequently Asked Questions

Frequently Asked Questions (FAQs) is a list of common questions and answers provided to quickly address common concerns or inquiries.

What are 100 and 255 in hex?

100 is 64 in hex, because 6 x 16 + 4 is 100. 255 is ff, because 15 x 16 + 15 is 255, the largest byte value. The tool prints both in plain lowercase, so paste them in to compare.

Why does hexadecimal use the letters a to f?

Base 16 needs sixteen symbols but we have ten numerals, so 10 to 15 borrow a to f. One hex digit equals four bits, so a byte is two hex digits (ff is 11111111). That is why a memory address like 0xdeadbeef takes eight hex digits.

Can I convert several decimal numbers at once, and how do I separate them?

Yes. Use spaces, tabs, new lines, semicolons or a comma plus space, in any mix. Results come back on one line. Guests get 100 entries, a free account 1,000, or upload a .txt file. A number typed as 1,000 is refused.

Can it convert negative numbers or decimals with a fraction?

Only whole numbers of 0 or more work. Values like -255, 3.14, 1e3 and +5 are each refused with a message naming the value, and nothing is converted. For a negative number, convert its absolute value first.

How big a number can I convert?

Very big. 2 to the power 64 and a 60 digit number matched Python exactly in our tests, and a 200,000 digit number converted in about a second in our tests. The limit is input size, about 200,000 characters.

Why is the result lowercase without 0x, and how do I add the prefix?

The tool prints plain lowercase hex with no 0x, no leading zeros and no padding, so 10 gives a. For code, add 0x yourself (0xff), uppercase it in your editor if needed, and pad bytes such as 0a.
Share on Social Media: