The simplest way to change a file type
The fastest way to change a file type in Windows 10 is to rename the file and swap out the three-letter extension at the end. If you have a file called document.txt, you can rename it to document.docx and Windows will treat it as a Word document. This works because Windows identifies file types by that extension — the part after the dot — not by what is actually inside the file.
Before you start, you need to make sure Windows is showing you file extensions. By default, Windows hides them, so you see "document" instead of "document.txt". Once you turn on extensions, renaming takes 10 seconds.
Here is how to show file extensions: Open File Explorer (the folder icon on your taskbar). Click the View tab at the top. Check the box next to File name extensions. Now every file will show its extension, and you can rename them.
Key Takeaways
- Windows identifies file types by the three-letter extension at the end of the filename, so changing .txt to .docx tells Windows to open it as a Word document.
- You must turn on file name extensions in File Explorer before you can see or change them — go to View and check the box.
- Renaming the extension works when ready, but the file contents do not automatically convert, so a text file renamed to .docx will open as a corrupted Word document.
- To actually convert a file from one type to another, you must open it in the correct program and save it in the new format using File > Save As.
- Some extensions are protected by Windows and cannot be renamed without administrator permission or a workaround.
The difference between renaming and converting
Renaming the extension is not the same as converting the file. If you have a plain text file and rename it from .txt to .docx, Windows will try to open it as a Word document — but the contents are still plain text, so Word will show an error or garbled text. The file extension is just a label; it does not change what is actually in the file.
To truly convert a file, you must open it in the program that handles the new format and save it there. For example, to turn a text file into a Word document, you open the .txt file in Microsoft Word, then go to File > Save As, choose the location, and change the file type dropdown from "Text Documents" to "Word Document". Word then saves it as a real .docx file with all the formatting that Word understands.
This matters because some file types are not compatible. A JPEG image file renamed to .mp3 will not play as music — it will just fail to open or play as noise. Renaming only works when you are switching between formats that can hold the same kind of data, like text files or documents.
How to rename a file extension step by step
Open File Explorer and find the file you want to rename. Right-click it and select Rename. The filename will highlight and become editable. Use the arrow keys or mouse to position your cursor just before the dot and the extension (for example, in "document.txt", position the cursor between "document" and ".txt").
Delete the old extension and type the new one. If you are changing "document.txt" to "document.docx", delete "txt" and type "docx". Press Enter. Windows may ask if you are sure you want to change the extension — click Yes. The file icon will change to match the new type, but remember that the contents have not changed.
If you cannot see the extension, go back to File Explorer, click View, and check File name extensions. If the rename option is grayed out or you get a permission error, the file may be protected. Right-click the file, select Properties, and check the General tab to see if it is marked as read-only. If it is, uncheck that box and click explore.
Converting files using Save As
The correct way to change a file type is to open it in the program that handles the new format and use Save As. Open the file in the appropriate program — for example, open a text file in Notepad or Word, or open an image in Paint or Photoshop. Go to File in the menu bar and click Save As.
A dialog box will open. Look for a dropdown that says "Save as type" or "File type". Click it and choose the format you want. For a text file, you might see options like "Text Documents (.txt)", "Word Document (.docx)", or "Rich Text Format (.rtf)". Select the one you want, give the file a new name if you wish, choose where to save it, and click Save. The program will convert the file to the new format and save it.
Not all programs support all formats. If you do not see the format you want in the dropdown, the program cannot convert to it. In that case, you may need to use a different program or a file conversion tool. For example, if you want to convert a video file from .mp4 to .avi, you would need video editing software or a dedicated converter — a text editor cannot do it.
Common file extensions and what they mean
Understanding what the extension tells you helps you know which program to use. .txt is plain text with no formatting — open it in Notepad or Word. .docx is a Word document with formatting, styles, and images — open it in Microsoft Word or Google Docs. .pdf is a locked format meant for sharing — open it in any PDF reader. .xlsx is an Excel spreadsheet — open it in Excel or Google Sheets.
For images: .jpg and .jpeg are compressed photos, .png is a compressed image with transparency, and .gif is an animated image. For audio: .mp3 is compressed music, .wav is uncompressed audio. For video: .mp4 is a common video format, .avi is an older format. Each extension tells you what kind of data is inside and which programs can open it.
When renaming does not work
Some files are protected and cannot be renamed. System files that Windows needs to run — like files in the Windows folder — are locked. If you try to rename one, you will get a message saying you do not have permission. Do not force it; protected files are protected for a reason.
You may also run into files that are currently open in a program. Windows will not let you rename a file while it is being used. Close the program first, then rename the file. If you still cannot rename it, restart your computer and try again — sometimes a program holds onto a file even after you close it.
If a file extension is very long or unusual, Windows may not recognize it. For example, if you rename a file to .xyz, Windows will not know what program to use to open it. Right-click the file, select Open with, and choose a program manually. Or rename it to a standard extension that the program recognizes.
Using online conversion tools
If you do not have the right program installed, online conversion tools can change file types for you. Websites like CloudConvert, Zamzar, or Online-Convert let you upload a file, choose the format you want, and read the converted version. These tools work for images, documents, audio, video, and many other types.
The trade-off is that you are uploading your file to someone else's server. For personal documents or sensitive information, this may not be safe. Read the website's privacy policy to see what they do with uploaded files. For public files or files you do not mind sharing, online converters are fast and require no software installation.
Frequently Asked Questions
Can I change a .jpg image to a .png just by renaming it?
Renaming will change the extension, but the image data inside stays the same. Windows will try to open it as a PNG, but it will still be a JPEG image. To truly convert it, open the image in Paint, Photoshop, or an online tool, and save it as PNG. The program will reformat the image data.
What happens if I rename a file and Windows does not recognize the extension?
Windows will show a generic file icon and will not know which program to use to open it. Right-click the file, select Open with, and choose a program from the list. If the program you want is not listed, click More apps or Look for another app on this PC to find it.
Can I change multiple file extensions at once?
Windows does not have a built-in batch rename tool for extensions, but you can select multiple files, right-click, and rename them one at a time. For large batches, third-party tools like Bulk Rename Utility or PowerRename (built into Windows 10 version 1803 and later) can rename many files at once using patterns.
Is it safe to change a file extension?
It is safe to rename files you own, but renaming system files or files you do not understand can break things. If you get a permission error, leave the file alone. For your own documents and media, renaming is harmless — the worst that happens is the file will not open correctly, and you can rename it back.
Why does my file show as corrupted after I rename it?
This happens when you rename a file to a format it is not actually in. A text file renamed to .docx will look corrupted in Word because Word expects Word formatting, not plain text. Rename it back to .txt, or open it in the original program and use Save As to convert it properly.