How to Change a File Type (Extension) in Windows 11

Changing a file’s type in Windows 11 usually means changing its extension, such as .txt to .csv. Renaming works when the contents already match the new type, but it does not convert the file. For a real conversion, open the file and save it in the new format.

Quick Answer

Turn on file name extensions in File Explorer (View, Show, File name extensions), select the file, press F2, change the extension and click Yes.

How to Change a File Type in Windows 11

  1. Open File Explorer.
  2. Click View, then Show, then check File name extensions.
  3. Select the file and press F2 (or right-click and choose Rename).
  4. Replace the text after the dot with the new extension, for example notes.txt to notes.csv.
  5. Press Enter and click Yes in the warning.
  6. Open the file to make sure it still works. If not, rename it back.
Rename dialog warning that changing a file name extension might make the file unusable, with Yes highlighted
Windows warns before changing an extension.

Rename vs Convert

Change Method
.txt to .csv or .md Rename is fine (both are plain text)
.png to .jpg Open in Paint, then File, Save as, JPEG
.heic to .jpg Use Photos or a converter
.docx to .pdf Open in Word, then Save as PDF
.mp4 to .mp3 Use a media converter

Change the Extension of Many Files at Once

Renaming files one by one gets tedious. Windows’ command-line tools can change every matching file in a folder in one step. Make a copy of the folder first so you can undo mistakes.

  1. Open the folder in File Explorer, right-click an empty area, and choose Open in Terminal.
  2. To change every .txt file to .csv in Command Prompt, run ren *.txt *.csv. In a PowerShell tab, run Get-ChildItem *.txt | Rename-Item -NewName { $_.BaseName + '.csv' }.
  3. Check the folder in File Explorer to confirm the new extensions.

The Terminal opens in PowerShell by default; open a Command Prompt tab from the drop-down arrow if you want to use ren. Both commands only rename files, so the same rule applies as for single files: the contents must already suit the new type.

Save a File in a Different Format Instead

When you need a true conversion, use the program that created the file, or one that can open it:

  • Notepad: choose File > Save as, set Save as type to All files, and type the full name with the new extension, such as data.csv or page.html. Otherwise Notepad may add .txt to the end.
  • Word: File > Save As, then pick a format such as PDF, Rich Text Format or Plain Text.
  • Excel: File > Save As, then choose CSV, XLSX or PDF.
  • Photos and Paint: open the image and use Save as to choose JPEG, PNG or another format.

Extensions to Be Careful With

Some extensions tell Windows to run a file as a program or script. Never rename a file you received to .exe, .bat, .cmd, .ps1, .vbs or .js unless you know exactly what it is, and be wary of attachments with double extensions such as invoice.pdf.exe. Showing file name extensions all the time makes these tricks easy to spot.

Why Windows Warns You, and How to Undo

When you change an extension, Windows shows “If you change a file name extension, the file might become unusable.” The warning appears because Windows picks the app that opens a file by its extension. A spreadsheet renamed to .jpg is still a spreadsheet inside, so the Photos app can’t read it. Nothing about the data changes, which is why the fix is simple: if the file stops opening, press Ctrl + Z in File Explorer straight away to undo the rename, or rename it back to the original extension later.

Change the Extension of a Hidden File

Hidden files don’t appear in File Explorer until you turn on View > Show > Hidden items. After that, rename them the same way. See how to show hidden files on Windows 11 for details. If you only need to see extensions, how to show file extensions in Windows 11 covers every method.

Troubleshooting

  • No extension visible: turn on File name extensions first; otherwise you only rename the name part.
  • File will not open after renaming: the contents do not match. Rename it back and convert instead.
  • Change the app a type opens with: use Default apps rather than renaming.
  • Related: changing file associations and converting HEIC to JPG.

Frequently Asked Questions

Can I change many files at once?

Yes, with a Terminal command such as ren *.txt *.csv in that folder.

Is renaming an extension safe?

Only when the formats are compatible. Keep a copy first.

Why is the Rename option greyed out?

The file is open or you lack permission.

Does this work on Windows 10?

Yes. In Windows 10, File name extensions is on the View tab.

Summary

  1. Show file extensions.
  2. Select the file.
  3. Press F2.
  4. Change the extension.
  5. Confirm with Yes.