The quickest way to change a file extension

To change a file extension in Windows 10, you first need to see the extensions — Windows hides them by default. Right-click the file, select Rename, and change the text after the final period. For example, change document.txt to document.docx. Windows will ask you to confirm the change because renaming the extension can break how the file opens.

This works for any file type, but changing the extension does not convert the file itself. Renaming a photo from .jpg to .png does not turn it into a real PNG file — it just tells Windows to try opening it with PNG software, which usually fails. The file's actual contents stay the same.

Key Takeaways

  • File extensions are hidden by default in Windows 10, so you must turn them on in File Explorer settings before you can see or change them.
  • Changing an extension by renaming the file does not convert the file — it only changes what program Windows tries to open it with.
  • Windows warns you when you rename an extension because the file may stop working if you choose the wrong one.
  • Some file types (like system files) are protected and cannot be renamed even if you have administrator rights.

How to show file extensions in File Explorer

Open File Explorer and look at the top menu bar. Click the View tab. On the right side of the ribbon, check the box next to File name extensions. From now on, you will see the extension on every file in that window — for example, photo.jpg instead of just photo.

This setting applies only to the current File Explorer window. If you want extensions visible in all windows, you need to change it in Folder Options. Click View again, then scroll down and select Options. In the window that opens, go to the View tab and uncheck Hide extensions for known file types. Click Apply and then OK. Now every File Explorer window will show extensions by default.

Renaming a file extension step by step

Once you can see extensions, right-click the file you want to change. Select Rename from the menu. The entire filename, including the extension, will highlight in blue and become editable. Use your keyboard to move to the extension part — the text after the final period — and change it to what you need.

For example, if you have invoice.txt and want to change it to invoice.pdf, click after the period and delete txt, then type pdf. Press Enter when you are done. Windows will show a dialog asking "Are you sure you want to change the file extension?" Click Yes to confirm. If you click No, the filename stays as it was.

Do not change the filename itself unless you also want to rename the file. If you want to keep the name but only change the extension, position your cursor carefully so you edit only the part after the period.

When changing an extension will not work

Renaming the extension tells Windows which program to use, but it does not change what the file actually contains. If you rename a Word document from .docx to .txt, Windows will try to open it as plain text, and you will see garbled characters instead of readable text. The file itself has not changed — only the instruction you gave Windows.

To actually convert a file from one format to another, you need the right software. Open the file in that software and use Save As to save it in the new format. For example, to turn a JPG photo into a PNG, open it in an image editor like Paint or Photoshop, then choose Save As and select PNG from the format list.

Some files are locked and cannot be renamed at all. System files, files in use by a running program, and files in protected folders will show an error when you try to rename them. Close any program using the file, or move the file to your Documents folder where you have full control.

Common file extensions and what they mean

Understanding what each extension does helps you avoid renaming mistakes. .txt is plain text with no formatting. .docx is a Word document with fonts, colors, and styles. .pdf is a locked format that looks the same on any computer. .jpg and .png are image formats — JPG is smaller but loses quality, PNG keeps quality but takes more space. .xlsx is an Excel spreadsheet. .mp3 and .wav are audio files.

If you are unsure what extension a file should have, right-click it and select Properties. The type will be listed there — for example, "Microsoft Word Document" or "JPEG Image". That tells you what the file actually is, separate from what its extension says.

Batch renaming extensions for multiple files

If you need to change the extension on many files at once, select them all first. Click the first file, then hold Ctrl and click each additional file you want to rename. Once they are all highlighted, right-click and select Rename. Type the new name — Windows will rename all selected files to that name and add a number to each one to keep them separate.

This method renames the filename itself, not just the extension. If you want to change only the extension on multiple files without changing their names, you will need a batch rename tool. Windows does not have this built in. Free tools like Bulk Rename Utility or Advanced Renamer let you change just the extension while keeping the original filename on dozens of files at once.

Frequently Asked Questions

Why does Windows hide file extensions by default?

Microsoft hides extensions to make filenames look cleaner for casual users. The downside is that you cannot see what type of file something is, and malware sometimes uses fake extensions to disguise dangerous files. Showing extensions gives you more control and makes it easier to spot problems.

Can I change a file extension without Windows asking for confirmation?

No. Windows always asks you to confirm when you change an extension because it knows the file may stop working. This is a safety feature. If you are certain about the change, click Yes to proceed.

What happens if I change a file extension to something wrong?

Windows will try to open it with the wrong program, and you will see an error or garbled content. You can undo this by renaming it back to the original extension. If you cannot remember what it was, right-click the file, select Properties, and look at the file type — that will tell you what the correct extension should be.

Is it safe to change file extensions?

It is safe to rename the extension as long as you know what you are doing. The danger is changing it to something that breaks the file. Never change extensions on system files or files you do not recognize. If you are experimenting, make a copy of the file first so you have a backup.

Can I change multiple file extensions at the same time?

Windows does not have a built-in way to batch-change only extensions while keeping filenames the same. You can rename multiple files at once, but it changes the whole filename. For extension-only changes on many files, use a third-party batch rename tool.