The quickest way to change a file extension

Right-click the file you want to change, select Rename, and edit the text after the dot. For example, change document.txt to document.pdf. Press Enter when you're done. Windows will ask if you're sure you want to change the extension—click Yes.

That's the whole process for most files. The file's icon may change to match its new extension, but the actual contents don't change just because you renamed it. A text file renamed to .pdf won't open as a PDF—it's still a text file inside. Changing the extension only tells Windows what program to use when you double-click it.

If you don't see the file extension at all, you need to turn on the setting that shows it. Windows hides extensions by default, which is why many people don't realize they're there.

Key Takeaways

  • Right-click any file, select Rename, and change the text after the dot to alter the extension.
  • Windows hides file extensions by default; turn them on in File Explorer settings so you can see and edit them.
  • Changing the extension only changes what program opens the file—it doesn't convert the file's actual contents.
  • Some system files and program files are locked and cannot be renamed; Windows will tell you if a file is protected.

How to show file extensions in Windows 11

Open File Explorer and look at the top menu. Click the View tab, then find Show on the right side. Click it and select File name extensions. From now on, every file will display its extension—the letters after the dot.

Once extensions are visible, you can rename any file the same way: right-click, select Rename, edit the extension, and press Enter. You'll see the full name including the extension highlighted in the text box, so be careful not to delete the filename itself when you're changing just the extension.

How to show file extensions in Windows 10

Open File Explorer and click the View tab at the top. Look for a checkbox labeled File name extensions and click it to turn it on. The checkbox will have a checkmark next to it when it's active.

If you don't see the View tab, click the three-dot menu icon in the top right corner of File Explorer, then select View from the dropdown. The File name extensions option should appear there.

What happens when you change a file extension

Changing the extension changes only the label—it tells Windows which program should open the file by default. If you double-click a file renamed from .txt to .jpg, Windows will try to open it with an image viewer instead of Notepad. The file's actual contents don't change, so the image viewer will show an error or garbage because the file is still text inside.

This is useful when you have a file that's already in the right format but has the wrong extension. For example, some websites read images with a .txt extension by mistake. Renaming it to .jpg tells Windows it's a picture, and it will open correctly. The file was always a picture—you just fixed the label.

Changing an extension does not convert between file types. You cannot turn a Word document into an Excel spreadsheet by renaming the extension. To actually convert a file, you need to open it in the correct program and save it in the new format.

When you cannot change a file extension

Some files are locked and cannot be renamed. System files, program files, and files that are currently open often have this protection. If you try to rename one, Windows will show an error message saying the file is in use or protected.

Close any program that might be using the file, then try again. If it's a system file (usually in Program Files or Windows folders), you may need administrator permission. Right-click the file, select Rename, and if Windows asks for permission, click Yes to proceed as administrator.

If you still cannot rename it, the file may be read-only. Right-click the file, select Properties, and look for a checkbox labeled Read-only near the bottom. Uncheck it, click explore, then OK. You should now be able to rename the file.

Common file extensions and what they mean

Understanding what extensions do helps you know when it's safe to change one. Here are the most common types:

ExtensionFile TypeOpens With
.txtPlain textNotepad, Word
.docxWord documentMicrosoft Word
.pdfPortable documentAdobe Reader, Edge
.jpg, .pngImagePhotos app, image viewer
.mp3, .wavAudioMedia Player, Spotify
.mp4, .aviVideoMovies app, VLC
.zipCompressed folderFile Explorer (built-in)
.exeProgram installerRuns as a program

Why Windows hides extensions by default

Microsoft hides extensions to make Windows look simpler for new users. The thinking is that most people don't need to see or change them, and showing them adds visual clutter. However, hiding them also makes it harder to spot certain problems—like a file named "document.txt.exe" that looks like a text file but is actually a program.

Turning on file extensions is a good security habit. It helps you spot suspicious files and understand what you're actually opening. Many IT professionals recommend keeping extensions visible at all times.

Frequently Asked Questions

Can I change a file extension to make it open in a different program?

Yes, changing the extension tells Windows which program to use when you double-click the file. However, the file's contents don't change, so the new program may not be able to read it. This works best when the file is already in the correct format but has the wrong extension label.

Will changing a file extension damage the file?

No. Renaming the extension does not alter the file's contents or structure. If you change your mind, you can always rename it back to the original extension. The only risk is opening the file in a program that doesn't understand its format, which may show an error but won't harm the file itself.

How do I change multiple file extensions at once?

Select all the files you want to rename by holding Ctrl and clicking each one. Right-click and select Rename. You can only rename one file at a time this way, but you can do them in quick succession. For batch renaming many files with the same new extension, consider using a dedicated batch rename tool or a PowerShell script if you're comfortable with command line.

What if I accidentally change a file extension and now it won't open?

Right-click the file, select Rename, and change the extension back to what it was before. If you don't remember the original extension, right-click the file, select Open with, and choose a program that might work. Once you find the right program, you'll know the correct extension.

Can I remove the file extension entirely?

Yes, you can delete the dot and everything after it, leaving just the filename. However, Windows will still treat the file as having an extension—it just won't display one. The file may not open properly without an extension, so this is rarely useful. It's better to keep an extension even if you change it to something else.