“We noticed you may be using an ad blocker. SEO Site Checker relies on ads to keep our SEO tools free. Please consider disabling your ad blocker to support us - thank you!”“We noticed you may be using an ad blocker. SEO Site Checker relies on ads to keep our SEO tools free. Please consider disabling your ad blocker to support us - thank you!”
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
Add numbers. Type or paste them into the Enter or paste your Decimal box, or choose a .txt file with Upload File.
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.
Press Convert to Hex. The Result appears.
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.
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.
1000 / 16 = 62, remainder 8.
62 / 16 = 3, remainder 14, written e.
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.
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.
We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. You consent to our cookies if you continue to use our website.
Install SEO Site CheckerFree SEO tools - always in your pocket.