What file extensions are and why you might change one
A file extension is the short code at the end of a filename that tells Windows what kind of file it is. It comes after the period — for example, .txt for a text file, .jpg for a photo, or .docx for a Word document. Windows uses the extension to decide which program opens the file when you double-click it.
You might need to change an extension if you've saved a file in the wrong format, if you're converting between file types, or if a file lost its extension somehow. The process is straightforward, but Windows hides extensions by default, so the first step is making them visible.
Key Takeaways
- File extensions are hidden in Windows by default, so you must turn on "Show file name extensions" in File Explorer settings before you can change one.
- Once extensions are visible, right-click the file, select Rename, and change the three or four letters after the period to the new extension you need.
- Windows will warn you that changing an extension might make the file unusable — this warning is real, so only change the extension if you're sure the file format supports it.
- Changing a .jpg to .png or a .txt to .csv works because the file content stays the same; changing a .docx to .txt will lose all formatting.
- If you're unsure whether a file can be safely converted, research the two formats first or keep a backup copy before you rename.
Turn on file extension visibility in Windows
By default, Windows hides file extensions to keep filenames looking cleaner. To change an extension, you need to see it first. Open File Explorer (the folder icon on your taskbar or press Windows key + E), then look at the top menu bar.
On Windows 11, click the View menu, then select Show, then check the box next to File name extensions. On Windows 10, click View at the top, then check the box for File name extensions in the ribbon that appears. Once you do this, all files in File Explorer will display their extensions from now on.
Rename the file and change its extension
Now that extensions are visible, find the file you want to change. Right-click it and select Rename from the menu. The filename will become editable — you'll see the whole name highlighted, including the extension.
Click at the end of the filename to position your cursor, then use backspace to delete the old extension (the period and the letters after it). Type a period followed by the new extension. For example, change photo.jpg to photo.png, or document.txt to document.csv. Press Enter when you're done.
Understand what happens when you change an extension
When you change an extension, you're only changing the label — the actual file content stays exactly the same. This works fine when the file format and the new extension match. A .jpg photo can be renamed to .png because both formats store image data the same way. A plain text file saved as .txt can become .csv because CSV files are just text with commas separating columns.
However, if you change an extension to something the file can't actually be opened as, Windows will either refuse to open it or open it in the wrong program. For example, if you rename a Word document from .docx to .txt, the file will still contain all the Word formatting code, and opening it as text will show gibberish instead of readable text.
What to do if Windows shows a warning
When you press Enter after typing a new extension, Windows may show a dialog that says "If you change a file name extension, the file may become unusable." This warning is real — it's telling you that the program associated with the new extension might not be able to read the file. Click Yes only if you're certain the file format supports the new extension.
If you're not sure, click No and research the two formats first. For example, if you're converting between image formats, check whether the original format can be safely converted to the new one. Some conversions lose quality or features, and it's worth knowing that before you commit.
Keep a backup before changing important files
If you're changing the extension on a file you care about, make a copy first. Right-click the file, select Copy, then right-click in the same folder and select Paste. Windows will create a duplicate with "- Copy" in the name. Now you can safely experiment with the original — if the new extension doesn't work, you still have the backup.
This is especially important for documents, spreadsheets, or media files that took time to create. A few seconds to make a copy can save you from losing work if the conversion doesn't go as planned.
Common extension changes and whether they work
| Original Extension | New Extension | Will It Work? | What Happens |
|---|---|---|---|
| .jpg | .png | Yes | Image opens normally; both are image formats. |
| .txt | .csv | Yes | File opens in a spreadsheet program; content is plain text with commas. |
| .docx | .txt | No | File opens as unreadable code; formatting is lost. |
| .mp3 | .wav | No | File won't play; the audio data is stored differently. |
| .png | .jpg | Yes | Image opens normally; both are image formats. |
Frequently Asked Questions
Can I change an extension on a file that's currently open?
No — Windows will not let you rename a file while a program is using it. Close the file first in whatever program opened it, then rename it in File Explorer. If you try to rename while it's open, you'll get an error message saying the file is in use.
What if I change an extension and the file won't open?
Change it back to the original extension. Right-click the file, select Rename, and restore the old extension. If you made a backup copy before changing it, you can also delete the renamed version and use the backup instead.
Do I need special software to change a file extension?
No — Windows File Explorer is all you need. The rename function is built in. You do not need to read or install anything.
Will changing an extension actually convert the file to a new format?
No — changing the extension only changes the label. The file content stays the same. To truly convert a file from one format to another (like turning a .docx into a .pdf), you need to use the program that created it or a conversion tool. straightforward renaming the extension will not do that.
Can I change the extension on multiple files at once?
Not with a single rename command. You have to rename each file individually. However, if you need to change many files, you can select them all (Ctrl + A), right-click, and look for a batch rename option if your version of Windows offers one — though most do not. Your safest option is to rename them one at a time.