A filename is a label, not a set of instructions
A file extension is the part of a filename after the last dot, such as .jpg, .pdf or .csv. Operating systems and apps use extensions as clues. When you double-click a file, your computer often uses its extension to decide which app should open it. That makes extensions useful, but they are still part of the filename, not a description your computer can rely on absolutely.
A file format is the way information is arranged inside the file. An image might contain encoded pixel data, while a document might contain text, formatting and embedded images. Changing photo.jpg to photo.png changes the label; it does not rearrange the image data into PNG format. The renamed file may open in an app that recognizes its contents, fail to open, or produce a misleading error.
Why a renamed file sometimes appears to work
Some apps inspect a file’s contents rather than trusting its extension. If you rename a JPEG image with a .png extension, a flexible image viewer might detect that the contents are still JPEG and display it anyway. That does not mean conversion took place. Another app, upload form or automated workflow may reject the same file because it expects PNG data.
Formats also vary in how easily software can identify them. Some include recognizable information near the beginning of the file; others depend more heavily on their structure or the context in which they are used. An app may make an educated guess, but guesses are not a substitute for using the format a recipient requests. For consistent results, the extension and the actual contents should agree.
Conversion creates new content in a different format
To convert a file, software must read its current format and write the information using the rules of another format. For example, an image editor can open a JPEG and export a PNG. The resulting file contains PNG data, not just a new name. Similarly, exporting a text document as a PDF creates a file designed for PDF readers rather than merely adding .pdf to the document’s filename.
Conversion is not always lossless. A plain-text file cannot preserve a document’s fonts and page layout because plain text has no place to store them. Saving an image in a format that uses lossy compression can also change its appearance. Even when two formats serve a similar purpose, they may support different features. Check the converted file before deleting the original, especially if layout, editability or image quality matters.
Choose the right action for the problem
If a file opens correctly but has the wrong extension, first find out what it actually is. An app’s file information or properties view may help, and opening the file in a trusted app can offer clues. If you know it was accidentally renamed, restoring its original extension may be enough. Avoid trying a series of extensions at random and assuming that whichever one opens is a conversion.
If you need a different format, open the file in an app that supports its current format and look for an Export, Save As or Convert command. Choose the destination format, save a separate copy, then reopen that copy to check the result. For a spreadsheet, for instance, exporting as CSV produces a text-based table but may leave behind formulas, formatting or additional sheets. Select the output format based on what the receiving app needs, not just the extension it lists.
Treat unexpected extensions with care
Extensions can also affect safety. A filename that looks like a document may belong to an executable program, especially if your file manager hides known extensions or the name contains more than one dot. A renamed file does not become safer because its name ends in .pdf or .jpg, and an unfamiliar attachment should not be opened simply to discover what it contains.
Configure your file manager to show extensions when possible, particularly when sorting downloads or email attachments. Keep an untouched copy before renaming or converting anything important. The practical rule is simple: rename a file to correct its label; convert it when you need its contents stored in a different format.



