What a file extension is and why you might change it
A file extension is the short code at the end of a filename — the part after the dot. A Word document ends in .docx, a photo in .jpg, a video in .mp4. The extension tells your computer which program should open the file and how to read the data inside.
You might need to change an extension when you save a file in a different format (converting a photo from .png to .jpg, for example), when a file loses its extension by accident, or when you're moving a file between systems that use different naming conventions. Changing the extension itself is straightforward, but it's worth understanding what actually happens when you do — renaming a .jpg file to .png doesn't convert the image, it just changes the label.
Key Takeaways
- File extensions are the three or four letters after the dot in a filename, and they tell your computer what program to use to open the file.
- On Windows, you need to turn on "Show file extensions" in File Explorer settings before you can see or edit them.
- On Mac, right-click the file, select "Get Info", and change the extension in the filename field at the top of the window.
- Changing only the extension label does not convert the file — a .jpg renamed to .png is still a jpeg image, just mislabeled.
- If you need to actually convert a file to a different format, use the "Save As" option in the program that created it, or use a conversion tool designed for that file type.
How to show file extensions on Windows
By default, Windows hides file extensions to keep filenames looking cleaner. You need to turn this setting on before you can edit an extension. Open File Explorer (the folder icon on your taskbar), then click the "View" tab at the top of the window.
Look for a checkbox labeled "File name extensions" — it's usually in the middle of the ribbon. Click it to turn it on. From now on, every file in File Explorer will show its full name including the extension. You only have to do this once; the setting stays on.
Changing an extension on Windows
Once extensions are visible, right-click the file you want to change and select "Rename" from the menu. The entire filename, including the extension, will highlight and become editable. Change only the letters after the dot — for example, change "photo.jpg" to "photo.png" — then press Enter.
Windows will ask you to confirm the change, warning you that changing the extension might make the file unusable. This is a safety feature. Click "Yes" if you're certain you want to proceed. The file will now show the new extension in File Explorer, though the actual data inside the file has not changed.
Changing an extension on Mac
On Mac, right-click (or Control-click) the file and select "Get Info" from the menu. A window will open showing details about the file. At the top, you'll see the filename in a text field. Click in that field and edit the extension — the part after the dot — to whatever you need.
When you click outside the text field or press Enter, Mac will ask whether you want to keep the old extension or use the new one. Select "Use the new extension" to confirm. The file's label will change when ready, though again, the contents of the file itself remain unchanged.
The difference between renaming an extension and converting a file
This is the most important thing to understand: changing the extension is just renaming the label. A .jpg file renamed to .png will still be a jpeg image — your computer just has the wrong label on it. If you try to open it with a program that expects a png file, it might not work properly, or it might open but display incorrectly.
If you actually need to convert a file from one format to another, use the program that created it. In Microsoft Word, go to "File" > "Save As" and choose a different format from the dropdown menu. In Photoshop or similar image editors, use "File" > "Export As" to save in a new format. These options actually transform the file's contents, not just its name.
For quick conversions without specialized software, online tools exist for common formats — image converters for photos, video converters for movies, and so on. These tools read the original file and create a new file in the format you want.
When changing an extension causes problems
If you change an extension and the file no longer opens, you have two options. First, change the extension back to what it was originally — right-click, rename, and restore the old extension. Second, if you know what the correct extension should be, change it to that instead and try opening it again.
If you're not sure what the original extension was, look in your computer's trash or recycle bin — the file might still be there with its original name. On Windows, open the Recycle Bin and search for the filename. On Mac, open Trash from the Dock. If you find it, you can see what the extension was supposed to be.
Why some files don't show extensions
System files and certain protected files on both Windows and Mac may not show extensions even when you've turned the setting on. This is intentional — these files are critical to how your computer runs, and hiding the extension is a way to prevent accidental changes. You generally should not rename these files anyway.
If you're trying to rename a file and can't see its extension, check whether the file is in a system folder (like System32 on Windows or /System on Mac). If it is, leave it alone. For regular files you've created or downloaded, the extension should always be visible once you've enabled the setting.
Frequently Asked Questions
Can I change a file extension and have it actually convert the file?
No. Changing only the extension label does not convert the file. You need to use the "Save As" or "Export As" option in the program that created the file, or use a dedicated conversion tool. Renaming alone just changes the label your computer sees.
What happens if I change a file extension and it won't open anymore?
Change the extension back to what it was originally, or to the correct format if you know it. If you're not sure what the original was, check your Recycle Bin (Windows) or Trash (Mac) — the file might still be there with its correct name visible.
Do I need to change the extension if I'm just moving a file to a different folder?
No. Moving a file to a different folder does not require changing the extension. The extension stays the same no matter where the file lives on your computer. You only need to change it if you're converting to a different format or fixing a mislabeled file.
Why does Windows hide file extensions by default?
Windows hides extensions to make filenames look simpler and to prevent accidental changes that could break files. Once you understand what extensions do, you can turn them on permanently in File Explorer settings so you can see and edit them when you need to.
Can I change multiple file extensions at once?
You can select multiple files at once and rename them together, but you'll be renaming the whole filename, not just the extension. For batch extension changes, you'd need a file renaming tool or script. For most people, changing files one at a time is the safest approach.