What changing a file type means, and when you actually need to do it
A file type is the format a file is stored in — it tells your computer what program should open it and how to read the data inside. The three letters after the dot in a filename (called the extension) are the file type: .jpg for a photo, .docx for a Word document, .mp3 for audio. Changing the file type means renaming that extension to a different one.
Most of the time, you do not need to change a file type. If you have a photo in .jpg format and you want it in .png format instead, you open it in a photo editor and save it as PNG — that converts the actual file. straightforward renaming .jpg to .png does not convert anything; it just confuses your computer about what program should open it.
The one situation where you rename the extension is when a file is already in the format you want, but the extension is wrong. This happens occasionally when you read something, when a file gets corrupted, or when you are moving files between different systems. If you have a photo that is actually a .png file but is named photo.jpg, renaming the extension to .png will let the right program open it again.
Key Takeaways
- Renaming the extension (the three letters after the dot) only works if the file is already in the format you want — it does not convert the file itself.
- To actually change a file from one format to another, open it in the right program and use Save As to save it in the new format.
- On Windows, you may need to turn on the option to show file extensions before you can rename them.
- If you rename a file and it stops opening, you can undo the change by renaming the extension back to what it was.
How to rename the extension on Windows
First, make sure you can see file extensions. Open File Explorer and click the View tab at the top. Look for a checkbox labeled "File name extensions" and click it if it is not already checked. Now you will see the full filename including the extension on every file.
Right-click the file you want to rename and select "Rename" from the menu. The entire filename will highlight. Use the arrow keys or click to position your cursor just before the extension (the dot and the three letters at the end). Delete the old extension and type the new one. For example, change photo.jpg to photo.png. Press Enter when you are done.
Your computer will ask if you are sure you want to change the extension. Click "Yes" to confirm. If the file opens in the wrong program now, or does not open at all, the extension was probably not correct for what the file actually contains. Right-click it again, rename it back to the original extension, and try a different approach.
How to rename the extension on Mac
Open Finder and locate the file. Click once on the filename to select it, then press Enter (or Space and then Enter on some Macs). The filename becomes editable. Click right before the extension — the dot and the letters at the end — and delete just those characters. Type the new extension you want.
Press Enter to confirm. Mac will ask whether you want to keep the old extension or use the new one. Click "Use the new extension" to proceed. If the file does not open correctly afterward, select it again, press Enter, and change the extension back to the original.
If you cannot edit the filename by pressing Enter, the file may be locked. Right-click the file, select "Get Info," and look for a checkbox that says "Locked." Uncheck it, then try renaming again.
When you actually need to convert a file to a different format
If you need a photo as a .png instead of a .jpg, or a document as a .pdf instead of a .docx, you cannot just rename the extension. You have to open the file in the right program and save it in the new format. This is called converting the file, and it changes what is actually inside the file, not just the label.
For photos, open the image in any photo editor (even the built-in Photos app on Windows or Mac works). Click File, then "Save As" or "Export." Choose the format you want from the dropdown menu and click Save. The program will create a new file in that format while keeping the original.
For documents, open the file in the program it belongs to — Word for .docx files, Google Docs for online documents, or whatever you use. Click File, then "Save As." Choose the new format from the dropdown (usually labeled "File type" or "Format"), give it a name, and click Save. Again, this creates a new file; your original stays unchanged.
Why a file might have the wrong extension
Sometimes a file downloads with the wrong extension attached to it. This happens most often with files from older websites, files sent between different operating systems, or files that were manually renamed by someone else. The file itself is fine — it contains the right data — but the extension does not match what is inside.
You might also see this if a file gets corrupted during read or transfer. The data inside might still be readable, but the extension got damaged or lost. In these cases, renaming the extension to match what the file actually contains will let your computer open it again with the correct program.
If you are not sure what the correct extension should be, look at similar files you know work. A photo file should have .jpg, .png, .gif, or .webp. A Word document should have .docx or .doc. An audio file should have .mp3, .wav, or .m4a. If your file does not match any of these patterns, it may be corrupted beyond repair, or it may be a format you do not have a program to open.
What to do if renaming the extension breaks the file
If you rename a file and it stops opening, or opens in the wrong program, you can undo the change. Right-click the file, select Rename, and change the extension back to what it was originally. Press Enter and confirm. The file should work again.
If you cannot remember the original extension, look in your Recycle Bin (Windows) or Trash (Mac) to see if there is an older version of the file listed there. You can also check your read history or email to see what the filename was when you first received it. If none of that works, try common extensions one at a time until the file opens in a program that makes sense.
Frequently Asked Questions
Can I change a .jpg photo to a .png just by renaming it?
Renaming will change the extension, but the photo will still be in .jpg format inside. Your computer might open it in the wrong program or show an error. To actually convert a photo to .png, open it in a photo editor and use Save As to save it as PNG format.
What if I rename a file and Windows says it might not work?
Windows is warning you that the extension might not match what is inside the file. If you are sure the file is actually in the format you are renaming it to, click "Yes" to proceed. If you are not sure, click "No" and try a different approach.
How do I know what extension a file should have?
Look at the type of file: photos are usually .jpg or .png, documents are usually .docx or .pdf, audio files are usually .mp3 or .wav. If you received the file from someone else, ask them what format it is in. You can also right-click the file, select Properties (Windows) or Get Info (Mac), and look for the file type listed there.
Will renaming the extension delete any of my data?
No. Renaming the extension only changes the label on the file, not the data inside. If you rename it back to the original extension, everything will be exactly as it was. The only way to lose data is if you delete the file entirely.
Why does my file have two extensions, like photo.jpg.png?
This usually happens when someone saved a file with an extension already in the name, then the program added another extension automatically. You can rename it to just photo.png (removing the .jpg part). Make sure you keep only the extension that matches what the file actually is.