Decimal to HEX
Decimal to Hex prints the hexadecimal form of the number you type, in uppercase. A blank box becomes 0. Text that is not a number comes back as NaN.
255FFProcessing: runs in your browser, nothing uploaded
About Decimal to HEX
Uppercase hex from a number
The box converts the text to a number and prints base 16 in uppercase. 255 becomes FF. 16 becomes 10. 10 becomes A. 0 becomes 0. A blank box becomes 0. Text that is not a number becomes NaN, with no separate error. Letters are A through F only in the output. You do not type those letters here. There is no 0x prefix on the result and no hash prefix. A color field that wants #FF0000 is not filled in by this page. Split the channels yourself or use a color converter. 16 is 10. 32 is 20. 160 is A0. Check those three before you copy a value into a color or a memory address.
Fractions and the safe range
A whole number is the intended input. A fraction prints a hexadecimal point, and the digits can be long for the same reason binary fractions get long. Negative numbers print with a minus, not as a two's complement byte. Values past the safe integer limit are not exact. 00FF is not an input style this page produces for 255. It prints FF without padding. If a protocol wants a fixed width, add the zeros yourself. There is no width field. 10.5 prints a hexadecimal point. If you only wanted a whole number, do not type a decimal point. The page will not round to the nearest integer for you. A leading minus stays a minus.
Do not confuse it with hex to decimal
Hex to Decimal starts from FF and prints 255. This page starts from 255 and prints FF. Pasting FF here returns NaN. Pasting 255 on the hex-to-decimal page is legal hex and equals 597, which is not two hundred fifty-five interpreted as decimal. Read the label on the box before you paste. Binary pages will not print FF. Decimal to Binary of 255 is 11111111. Same quantity, different alphabet. Type 26 and expect 1A. Type 27 and expect 1B. The second digit walks A, B, C, D, E, and F before it rolls to 10. That roll is the same idea as 9 becoming 10 in decimal.
A three-value check
Type 255. Expect FF. Type 10. Expect A. Type 4095. Expect FFF. Type abc. Expect NaN. Type 0. Expect 0. If FF comes back in lowercase, this is not that build: the function calls toUpperCase on the hex string. The result stays on this device. Copy it if a form wants the digits without a prefix. Type 15 and expect F. Type 14 and expect E. Type 256 and expect 100. If you see ff in lowercase, the uppercase step did not run.
How to use
- 1
Type one decimal number.
- 2
Run the conversion.
- 3
Copy the uppercase hex. 255 should show FF.
Privacy
The number is converted to hex in this browser and is not uploaded.
Frequently asked questions
What does 255 become?
FF, in uppercase. 10 becomes A. 4095 becomes FFF. 256 becomes 100, 15 becomes F, 26 becomes 1A, 32 becomes 20, and 160 becomes A0.
What does abc print?
NaN. Type a decimal number, not hex letters.
Will the result include 0x or a hash?
No. You get the digits only. Add a prefix yourself if a form requires one.
Does it pad to two digits?
No. 255 is FF, not 00FF. Add zeros if you need a fixed width.
Is FF on this page two hundred fifty-five?
Pasting FF here returns NaN. The page that accepts FF is Hex to Decimal.
Related tools
HEX to Decimal
Binary to Decimal
Decimal to Binary
HEX Decoder
Morse Encoder
Number to Words
Base64 Decoder
Binary Converter
Browse all Text Tools · Sitemap