The quickest way to change a file extension
The fastest method is to right-click the file, select Rename, and edit the extension directly in the filename. Windows 10 hides file extensions by default, so you will need to turn that setting off first — otherwise you will only see the filename without the dot and three-letter code at the end.
Once you can see the full filename including the extension, click at the end of the name, delete the old extension, type the new one, and press Enter. Windows will ask you to confirm the change. This works for any file type, though changing an extension does not convert the file's contents — it only changes what Windows thinks the file is.
Key Takeaways
- File extensions are hidden by default in Windows 10, so you must turn on "Show file name extensions" in File Explorer settings before you can edit them.
- Right-click any file, select Rename, delete the old extension after the dot, type the new extension, and press Enter to change it.
- Changing the extension does not convert the file — a renamed .jpg file is still a picture file even if you call it .txt, and opening it in the wrong program will show garbage.
- Some file extensions are protected by Windows and cannot be changed without administrator permission or special tools.
Turn on the display of file extensions
Open File Explorer by pressing the Windows key and typing "file explorer," then clicking the result. At the top of the window, click the View tab. Look for a checkbox labeled File name extensions and click it to turn it on.
Once enabled, you will see the full filename with the extension on every file in that folder. This setting stays on for all folders going forward, so you only need to do this once. If you do not see the View tab, make sure you are in File Explorer (not Settings or another program).
Rename the file and change its extension
Navigate to the file you want to change. Right-click it and select Rename from the menu. The filename will become editable, highlighted in blue.
Use the arrow keys or click to position your cursor right before the dot that precedes the extension. Select the entire extension (the dot and the letters after it) and delete it. Type the new extension, including the dot — for example, type .pdf or .txt. Press Enter when you are done.
Windows will display a dialog asking you to confirm the change. It will warn you that changing the extension might make the file unusable. Click Yes to proceed. The file now has the new extension, though its actual contents remain unchanged.
What happens when you change an extension
Changing a file extension only changes the label — it does not convert the file itself. If you rename a photo from picture.jpg to picture.txt, Windows will treat it as a text file, but it is still a picture file underneath. If you try to open it in Notepad, you will see random characters and symbols instead of readable text.
The file will open correctly in its original program (like a photo viewer for a .jpg) even after you rename it, because the program recognizes the actual file format, not just the extension. However, some programs rely on the extension to decide how to open a file, so renaming can cause problems if you are not careful.
Extensions you cannot change easily
Windows protects certain system file extensions to prevent accidental damage. Files with extensions like .exe, .dll, .sys, and .bat may refuse to rename, or Windows may require administrator permission. If you see an error message when trying to rename a file, right-click it again, select Rename, and try again — sometimes the second attempt works.
If the file still will not rename, you may need to run File Explorer as administrator. Right-click the File Explorer icon in your taskbar, select Run as administrator, and then try renaming the file. Do not rename system files unless you know exactly what you are doing, as this can prevent Windows from starting or running correctly.
Common mistakes when changing extensions
The most common error is forgetting to include the dot before the new extension. If you type pdf instead of .pdf, the file will be named something like document.pdfdocument and will not open in any program. Always include the dot.
Another mistake is changing the extension of a file you need to work with, then being surprised when it will not open in the program you expected. If you rename a Word document from .docx to .txt, it will open in Notepad as unreadable code. If you need to convert a file to a different format, use the original program's "Save As" option instead of just renaming it.
Using File Explorer's advanced rename options
If you need to change the extension on many files at once, you can select multiple files, right-click, and choose Rename. Windows will rename them all with a number in parentheses, like file (1), file (2), but this does not change extensions — it only renames the base filename.
For bulk extension changes, you will need to rename each file individually or use a third-party batch renaming tool. Windows 10 does not have a built-in batch extension changer in File Explorer, so the right-click method is the standard approach for one or two files.
Frequently Asked Questions
Will changing the extension break the file?
Changing the extension does not break the file itself — the data inside stays the same. However, the file may not open in the program you expect, or it may open as unreadable text. The original program can usually still open it correctly because it recognizes the actual file format, not just the extension label.
Can I change a .jpg to a .png just by renaming it?
You can rename it, but it will still be a .jpg file underneath. Windows will treat it as a .png, but the image data has not changed. Some programs may refuse to open it or display it incorrectly. To actually convert a .jpg to a .png, use image editing software like Paint or a free online converter.
Why does Windows hide file extensions by default?
Microsoft hides extensions to make filenames cleaner and easier to read for casual users. However, this also makes it easier for malware to disguise itself — a file named "document.txt.exe" would appear as just "document.txt" with extensions hidden. Turning on the display of extensions helps you see what type of file you are actually opening.
What if the file extension box is grayed out in View settings?
This usually means you are viewing a system folder or do not have permission to change settings for that location. Try opening a regular folder like Documents or Downloads and turning on the extension display there. You can also try running File Explorer as administrator if the setting remains locked.
Can I change an extension on a file I do not own?
If the file is on your computer and your user account has permission to modify it, you can rename it. If the file is on a shared network drive or belongs to another user, you may not have permission. Right-click the file and check the Properties tab — if you see "Read-only" checked, you will need to uncheck it first or ask the file owner for permission.