You can change a file type by renaming the extension, but what matters is whether your computer can actually open it that way

A file type is determined by the three or four letters after the dot in a filename — the extension. A photo named vacation.jpg is a JPG file. If you rename it to vacation.png, your computer will see it as a PNG file. But renaming alone does not convert the actual data inside. The file still contains JPG information; you have just told your computer to read it as something else. Sometimes this works fine. Often it does not.

Whether you should rename a file depends on what you are trying to do. If you want to open a file in a different program, renaming might work — or you might need to actually convert it using software designed for that purpose. If you want to email a file and the recipient's email blocks that type, renaming will not help; the file is still the same thing underneath.

Key Takeaways

  • Renaming the extension (the letters after the dot) changes what your computer thinks the file is, but does not change what is actually inside the file.
  • On Windows, right-click a file, choose Rename, and change the extension; on Mac, select the file and press Return to edit the name the same way.
  • Converting a file to a truly different format requires software designed for that conversion — a photo editor for images, a video converter for video, or a document converter for text.
  • Some file types can be renamed without problems because the data inside matches the new extension; others will not open or will open incorrectly.
  • Before renaming a file, make a copy first so you do not lose the original if the renamed version does not work.

How to rename a file extension on Windows

Open File Explorer and find the file you want to rename. Right-click on it and select Rename from the menu. The filename will become editable — you will see the whole name highlighted in a box. Change only the letters after the dot. For example, change document.docx to document.txt. Press Enter when you are done.

If you cannot see the extension at all, you need to turn on the setting that shows file types. In File Explorer, click the View tab at the top, then check the box next to File name extensions. Now extensions will appear on all your files, and you can rename them.

Windows will sometimes warn you that changing the extension might make the file unusable. This is a real warning — it means Windows thinks the file might not open correctly with the new extension. You can click Yes to proceed anyway, but make a copy of the original first.

How to rename a file extension on Mac

Find the file in Finder. Click once on it to select it, then press Return (or Enter). The filename becomes editable. Change only the extension — the letters after the dot. Press Return again to save the change.

If you do not see the extension, click on the file once to select it, then press Command and I together to open the Info window. Look for the filename field and edit it there. Mac will show you the extension if it exists.

Mac will also warn you if changing the extension might cause problems. The warning will say something like "Are you sure you want to change the extension from .jpg to .png?" Click Use the new name to proceed, or click Keep the old extension to cancel.

When renaming actually works

Renaming works best when you are changing between formats that store similar data. A text file saved as .txt can usually be renamed to .csv (comma-separated values) and opened in a spreadsheet program, because both are plain text underneath. A JPG photo can sometimes be renamed to .png and still open, though you lose some of the benefits of the PNG format.

Renaming also works when a program expects a certain extension but can actually read the data inside. Some older software looks only at the extension to decide how to open a file, not at what is actually in it. If you have a file that program refuses to open, renaming the extension to what the program expects might solve it.

The safest approach: make a copy of the file first, rename the copy, and try to open it. If it works, you know renaming was enough. If it does not, you still have the original.

When you need actual conversion software

If you want to change a photo from JPG to PNG and keep the quality benefits of PNG, or convert a video from one format to another, or turn a Word document into a PDF, you need software that actually converts the file. Renaming will not do this.

For photos, use a free tool like Paint (built into Windows) or Preview (built into Mac). Open the photo, then use File > Export As or File > Save As and choose the new format. For videos, tools like HandBrake (free, works on Windows and Mac) let you convert between formats. For documents, most word processors have an Export or Save As option that lets you choose PDF or other formats.

Online converters exist for almost every file type — search for "convert JPG to PNG" or "convert MP4 to AVI" and you will find options. These are usually free but require you to upload your file to a website. Only use these for files that do not contain personal information, because you are sending the file to someone else's server.

Changing file types on your phone

On iPhone or Android, you cannot rename file extensions the way you can on a computer. Instead, use an app designed to convert or export files in the format you need. For photos, the built-in Photos app on iPhone can export to different formats through the Share menu. On Android, apps like File Manager (built in) show your files, but you will still need a conversion app to change formats.

Most phone apps handle conversion automatically. If you take a photo on your iPhone, it is stored as HEIC (a newer Apple format). When you email it or send it through most messaging apps, the phone automatically converts it to JPG so the recipient can open it. You do not have to do anything — the app handles it.

If you need to convert a file on your phone and the built-in apps do not offer that option, search your phone's app store for the conversion you need. Search for "convert PDF to Word" or "convert video to MP4" and you will find apps that do this work.

Why file extensions matter for sharing

When you send a file to someone else, the extension tells their computer what program to use to open it. If you rename a file but do not actually convert it, the recipient might not be able to open it — or it might open in the wrong program and look corrupted.

Some email systems and messaging apps block certain file types for security reasons. A file with a .exe extension (a Windows program) might be blocked because it could contain malware. Renaming .exe to .txt will not make it safer — it is still the same executable file. The recipient would have to rename it back to run it, and that defeats the purpose of the block.

If you need to send a file type that is being blocked, ask the recipient what format they can receive, then use conversion software to actually change the file to that format. This is safer and more reliable than renaming.

Frequently Asked Questions

Can I rename a file to any extension I want?

Technically yes — your computer will let you rename any file to any extension. But the file will only open correctly if the data inside matches what the new extension says it should be. A photo renamed from JPG to TXT will not open as text. Make a copy and test it first.

Will renaming a file make it smaller or larger?

No. Renaming only changes the label on the file, not the data inside. The file size stays exactly the same. If you want a smaller file, you need actual conversion software that compresses the data.

What if I rename a file and it stops opening?

Rename it back to the original extension. If you cannot remember what it was, right-click the file, choose Properties (Windows) or Get Info (Mac), and look for the file type listed there. Then rename it back to match.

Is it safe to rename files I downloaded from the internet?

Renaming does not change what a file actually does, so it does not make a dangerous file safe. Only rename files you trust. If you are unsure whether a downloaded file is safe, scan it with antivirus software before opening it, regardless of what extension it has.

Can I change multiple files at once?

You can select multiple files (Ctrl+click on Windows, Command+click on Mac) and rename them together, but only if you want them all to have the same new extension. Windows and Mac will add a number to each one so they do not all have identical names. For more complex renaming, batch renaming software like Bulk Rename Utility (Windows) gives you more control.