The quickest way to change a file extension

Right-click the file you want to change, select Rename, and edit the text after the period. Windows 10 will warn you that changing the extension might make the file unusable — click Yes to confirm. That's the whole process.

The file extension (the letters after the period, like .txt or .jpg) tells Windows which program should open the file. Changing it doesn't actually convert the file to a new format — it just tells Windows to try opening it with a different program. If you rename a photo from .jpg to .txt, Windows will try to open it as text, but the photo data inside stays the same.

This matters because renaming alone won't fix a corrupted file or turn one file type into another. It's useful when you know what program you want to use and just need Windows to stop blocking you, or when a file lost its extension and you know what it should be.

Key Takeaways

  • Right-click a file, choose Rename, change the letters after the period, and press Enter — Windows will ask you to confirm the change.
  • Changing the extension tells Windows which program to use, but doesn't actually convert the file's contents into a new format.
  • If you can't see the extension on your file, turn on the "File name extensions" option in the View tab of File Explorer.
  • Some extensions are blocked by Windows for security reasons, and renaming to those extensions won't work even if you confirm the warning.

Why you might not see the extension in the first place

By default, Windows 10 hides file extensions for files it recognizes. This keeps the screen less cluttered, but it also means you can't see or change what you're looking at. If you see a file called "Resume" instead of "Resume.docx", the extension is hidden.

To show extensions, open File Explorer and click the View tab at the top. Check the box next to File name extensions. Now every file will show its full name, including the period and the letters at the end. This setting applies to all folders, so you only have to do it once.

Renaming a single file versus renaming multiple files at once

For one or two files, right-click and rename. For many files with the same extension, you can select them all at once and rename them together. Click the first file, hold Shift, and click the last file to select a range. Then right-click and choose Rename — Windows will rename the first file, and you can use the arrow keys to move through the others and rename each one.

If you need to change the extension on dozens of files, this gets tedious. A faster option is to use the Command Prompt. Open Command Prompt as administrator (right-click the Start button, select Windows Terminal (Admin) or Command Prompt (Admin)), navigate to the folder with your files, and use the command ren *.oldextension *.newextension — replacing oldextension and newextension with the actual letters. This changes every file in that folder at once.

When Windows blocks you from changing an extension

Some extensions are blocked for security reasons. If you try to rename a file to .exe, .bat, .com, or .msi, Windows will refuse even after you click Yes on the warning. These are executable files — programs that run code — and Windows protects you from accidentally running malware.

If you genuinely need to use one of these extensions, you can disable the protection, but this is risky. Right-click the file, select Properties, check Unblock at the bottom of the General tab, and click explore. Then try renaming again. Only do this if you trust the file completely — this is how malware often spreads.

The difference between renaming and actually converting a file

Renaming a .jpg file to .png doesn't turn it into a PNG. It just tells Windows to try opening it with a PNG viewer. The image data inside is still JPEG data, and some programs might refuse to open it or display it incorrectly.

To actually convert a file from one format to another, you need a program that reads the original format and saves it in the new one. For images, you can use the built-in Photos app (right-click the image, select Open with, choose Photos, then use the menu to export as a different format) or free tools like IrfanView or XnConvert. For documents, open the file in the program that created it and use File > Save As to choose a new format.

How to find what extension a file should have

If you have a file with no extension or the wrong one, the easiest way to find out is to right-click it, select Open with, and see what programs Windows suggests. The program name often hints at the format — if it suggests Notepad, it's probably a text file (.txt). If it suggests Paint, it's probably an image (.bmp, .jpg, or .png).

You can also search online for the file name plus "file type" or "file format". If you have a file called "document" with no extension and you remember it was a Word file, search "Word document file extension" and you'll find it should be .docx. Once you know the right extension, rename the file and try opening it again.

Frequently Asked Questions

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

Yes, but only if that program can actually read the file. Renaming a .txt file to .jpg won't make it a photo — it just tells Windows to try opening it with an image viewer, which will fail. The file's contents have to match the extension for the program to understand it.

What happens if I change a file extension and then change it back?

The file returns to normal. Renaming doesn't damage the file itself, just tells Windows which program to use. If you rename a photo from .jpg to .txt and then back to .jpg, the photo data is unchanged.

Why does Windows warn me when I change an extension?

Because changing an extension can break a file if you rename it to something the program can't read. The warning is a safety check. Click Yes only if you're sure you want to proceed.

Can I change the extension on a file that's currently open?

No. Close the file first in whatever program is using it, then rename it. If you try to rename while it's open, Windows will tell you the file is in use.

Is there a way to change extensions on all files in a folder at once?

Yes, using Command Prompt. Open Command Prompt as administrator, navigate to the folder, and type ren *.oldextension *.newextension. This changes every file in that folder with the old extension to the new one when ready.