The quickest way to change a file type

The fastest way to change a file type on Windows 10 is to rename the file and swap out the extension—the three or four letters after the dot at the end of the filename. Right-click the file, select Rename, delete the old extension, type the new one, and press Enter. Windows will ask you to confirm the change; click Yes. That's the whole process for most files.

This works because Windows identifies file types by their extension, not by what's inside the file. A file called document.txt is a text file; rename it to document.docx and Windows treats it as a Word document. The file's contents don't change—only the label does—so this method is safe to try and straightforward to undo if something goes wrong.

The one catch: some files won't open in the new program if the contents don't actually match the new format. A photo saved as a .jpg file will still be a photo if you rename it to .png, and most programs will open it fine. But a text file renamed to .mp3 won't play as music. The extension tells the program what to expect; if the contents don't match, the program will either refuse to open it or display garbage.

Key Takeaways

  • Right-click any file, select Rename, change the three-letter extension after the dot, and press Enter to change its file type.
  • Windows identifies file types by their extension, so renaming the extension changes how Windows and other programs treat the file.
  • You must first turn on file extensions in File Explorer if you only see the filename without the dot and extension.
  • Renaming a file's extension does not convert its contents—a JPEG photo renamed to PNG is still a JPEG photo inside, and will usually open fine in programs that expect PNG files.
  • If a renamed file won't open or opens as gibberish, undo the rename by pressing Ctrl+Z when ready, or right-click and rename it back.

Turn on file extensions if you can't see them

By default, Windows 10 hides file extensions in File Explorer. You see document instead of document.txt. If you can't see the extension, you can't rename it, so you need to turn this setting on first.

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. File extensions will now appear on every file in that window and in File Explorer going forward. You only have to do this once.

If you don't see a View tab, you may be in a folder view that doesn't show it. Click the three horizontal lines (hamburger menu) in the top left corner, then select View from the dropdown.

Rename the file and change the extension

Once you can see file extensions, right-click the file you want to change. A menu will pop up. Select Rename from the list. The filename will now be highlighted and ready to edit.

The entire filename, including the extension, is selected. You can delete it all and type a new name, or click once inside the name to position your cursor and edit just the part you want. To change only the extension, click right before the dot, then select and delete the old extension (the letters after the dot), and type the new one.

For example, if the file is photo.jpg and you want it to be photo.png, click just before the .jpg, select jpg, delete it, and type png. The result is photo.png. Press Enter when you're done.

Confirm the file type change when Windows asks

After you press Enter, Windows will show a dialog box asking you to confirm the change. It will say something like "If you change a filename extension, the file may become unusable. Are you sure you want to change it?" This is a safety warning, not a blocker. Click Yes to proceed.

Windows shows this warning because changing an extension can break a file if the contents don't match the new format. But for most everyday tasks—renaming a photo, a text file, or a document—this warning is just a formality. The file will rename and the change takes effect when ready.

What to do if the renamed file won't open

If you rename a file and then try to open it, and the program refuses or displays garbage, the file's contents don't match the new extension. The quickest fix is to undo the rename right away. Press Ctrl+Z while File Explorer is still open, and the filename will revert to its original extension.

If you've already closed File Explorer, right-click the file, select Rename, and change the extension back to what it was before. You can also look in the file's properties to see what type it actually is. Right-click the file, select Properties, and look at the "Type of file" line near the top. That tells you what format the file actually contains, which is usually the correct extension to use.

Common file extensions and what they mean

Here are the extensions you'll encounter most often on Windows 10:

ExtensionFile TypeCommon Programs
.txtPlain textNotepad, Word, any text editor
.docxWord documentMicrosoft Word, Google Docs
.pdfPortable documentAdobe Reader, Edge, Chrome
.jpg or .jpegPhoto (compressed)Photos app, Paint, any image viewer
.pngPhoto (lossless)Photos app, Paint, any image viewer
.mp3Audio fileWindows Media Player, Spotify, VLC
.mp4Video fileWindows Media Player, VLC, Movies app
.zipCompressed folderFile Explorer (built-in), 7-Zip, WinRAR
.exeProgram installerWindows (runs directly)

If you're unsure what extension a file should have, search online for the program that created it. For instance, if you have a file from Adobe Photoshop, search "Adobe Photoshop file extension" and you'll find that it's .psd. Renaming to the correct extension usually lets the original program open it again.

When renaming won't work and you need conversion

Renaming a file changes only the label, not what's inside. If you have a photo in JPEG format and rename it to PNG, it's still a JPEG photo—most programs will open it fine because they look at the actual contents, not just the extension. But if you have an audio file in MP3 format and rename it to WAV, a program that strictly checks the extension might refuse to open it, even though the contents are still MP3 data.

If you need to actually convert a file from one format to another—turning a JPEG into a PNG, or an MP3 into a WAV—renaming alone won't do it. You need a conversion program. For photos, the built-in Photos app or Paint can save in different formats. For audio and video, programs like VLC or Audacity can convert between formats. Renaming is only for changing the label; conversion is for changing what's actually inside the file.

Frequently Asked Questions

Can I change a file extension to any extension I want?

Technically yes—Windows will let you rename any file to any extension. But the file will only open correctly in programs that can read its actual contents. A text file renamed to .jpg won't display as a photo. Stick to extensions that match what the file actually contains, or the file may not open at all.

Will changing a file extension delete or damage the file?

No. Renaming the extension only changes the label; the file's contents stay exactly the same. If something goes wrong, press Ctrl+Z when ready to undo the rename, or right-click and rename it back. The file itself is never harmed.

What's the difference between .jpg and .jpeg?

They are the same format—just two different ways to write the extension. Windows and most programs treat them identically. You can rename a .jpg file to .jpeg or vice versa with no loss of quality or function.

Why does Windows hide file extensions by default?

Windows hides extensions to make filenames look cleaner for casual users. But hiding them also prevents accidental changes and makes it harder for viruses to disguise themselves (a virus might be named "document.txt.exe" but show as "document.txt" if extensions are hidden). You can turn extensions back off anytime using the same View menu.

Can I change the extension of a program file like .exe?

You can rename it, but the program won't run. Windows and other programs rely on the .exe extension to know that a file is executable. Renaming it to something else breaks that connection. Only rename .exe files if you're trying to prevent them from running, and be careful—you might accidentally break something you need.