What changing a file type actually means

Changing a file type means renaming the file extension — the three or four letters after the dot at the end of a filename. A file called photo.jpg has the extension .jpg. If you rename it to photo.png, you have changed its file type from JPG to PNG. The computer reads that extension to decide which program opens the file.

This is different from converting a file, which changes what is actually inside it. Renaming the extension alone does not convert the data. A JPG file renamed to .png will not suddenly work like a PNG file — it will just confuse your computer about what program should open it. Sometimes renaming works anyway because the file format inside matches the new name. Often it does not, and you end up with a file that will not open properly.

Most of the time, if you need a different file type, you need to convert the file using the right program, not just rename it. But renaming the extension is the first step, and it is what this guide covers.

Key Takeaways

  • File extensions are the letters after the dot in a filename, and renaming them tells your computer which program should open the file.
  • On Windows, you may need to turn on "Show file extensions" in File Explorer settings before you can see or edit them.
  • On Mac, right-click the file, choose "Get Info", and change the extension in the Name field at the top.
  • Renaming the extension alone does not convert the file's contents — it only changes what program tries to open it.
  • If renaming the extension breaks the file, undo the change and use a conversion program instead.

How to show file extensions on Windows

By default, Windows hides file extensions from view. You see photo instead of photo.jpg. To change a file type, you need to see the extension first.

Open File Explorer. Click the View tab at the top. Look for a checkbox labeled File name extensions and click it to turn it on. Now all your files will show their extensions. You can now see which files are .jpg, .txt, .pdf, and so on.

Once extensions are visible, right-click the file you want to change. Choose Rename. Change only the letters after the dot. For example, change document.txt to document.pdf. Press Enter. Windows will ask if you are sure you want to change the file type. Click Yes.

How to change a file type on Mac

On Mac, extensions are usually hidden too, but you can change them without turning on a view setting. Right-click the file and choose Get Info. At the top of the window that opens, you will see the filename in a field you can edit.

Click in that field and change the extension. For example, change photo.jpg to photo.png. Press Enter. Mac will ask if you are sure. Click Use the new name. The file type has now been changed.

If you want to see extensions all the time on Mac, open Finder, click Finder in the menu bar, then Settings. Go to the Advanced tab and check the box next to Show all filename extensions. After that, you can rename extensions the same way you would on Windows — right-click, choose Rename, and change the extension.

How to change a file type on Linux

Linux file managers show extensions by default. Open your file manager, right-click the file, and choose Rename. Change the extension and press Enter. Some Linux file managers will warn you that changing the extension may break the file. Click Rename anyway or Continue to proceed.

If your file manager does not have a Rename option in the right-click menu, you can use the terminal instead. Open a terminal window. Type mv oldname.oldextension newname.newextension and press Enter. For example: mv photo.jpg photo.png. The file extension has now been changed.

When renaming the extension actually works

Renaming the extension works without breaking the file in a few specific cases. If you rename a .jpg to .jpeg, or a .txt to .text, the file will still open fine because these are just different names for the same format. The data inside has not changed.

Renaming also works when you are changing between formats that are actually compatible. For example, some image editors save files in a format that is compatible with both .tif and .tiff extensions. Renaming between them causes no problems.

In most other cases, renaming the extension will make the file unreadable. If you rename a Word document from .docx to .pdf, the file will not open as a PDF — it will just be broken. To actually convert files between different formats, you need to use the right program: an image editor to convert images, a document converter to convert documents, a video editor to convert video, and so on.

What to do if renaming broke your file

If you renamed a file and it no longer opens, undo the change immediately. Right-click the file, choose Rename, and change the extension back to what it was before. Press Enter. The file should open normally again.

If you cannot remember the original extension, look at other files of the same type. If you have another photo that opens fine, right-click it and check its extension. Use that same extension for the broken file.

Once you have restored the original extension, use a conversion program if you need a different file type. For images, use free tools like GIMP or online converters. For documents, use LibreOffice or Microsoft Office to open the file and save it in a new format. For video, use a tool like HandBrake. The conversion program will change what is actually inside the file, not just the name.

Common file extensions and what they mean

Knowing what extensions represent helps you avoid mistakes. Image files include .jpg (photographs), .png (images with transparency), .gif (animated images), and .bmp (uncompressed images). Document files include .txt (plain text), .docx (Word), .pdf (portable document), and .xlsx (Excel spreadsheet). Video files include .mp4 (standard video), .mov (Apple video), .avi (older video), and .mkv (high-quality video). Audio files include .mp3 (compressed audio), .wav (uncompressed audio), .flac (high-quality audio), and .aac (Apple audio).

When you rename a file, you are telling your computer which program should try to open it. If you rename a .jpg to .mp3, your computer will try to open the image file with a music player, which will fail. The file inside has not changed — only the label has. This is why conversion programs matter: they actually change the data inside to match the new format.

Frequently Asked Questions

Can I change a file type by just typing a new extension?

Yes, you can rename the extension by right-clicking the file and choosing Rename, then typing a new extension. But this only changes the label, not what is inside the file. The file will only work properly if the data inside actually matches the new format. Most of the time, you will need a conversion program instead.

Why does Windows hide file extensions by default?

Windows hides extensions to make filenames look simpler to new users. But this also prevents accidental changes and protects against malware that hides dangerous file types. You can turn extensions back on in File Explorer settings under the View tab.

What is the difference between renaming and converting a file?

Renaming changes only the extension — the label your computer reads. Converting uses a program to actually change what is inside the file so it works in the new format. If you need a file to work as a different type, you almost always need to convert it, not just rename it.

Will renaming a file to .exe make it dangerous?

Renaming a file to .exe does not make it dangerous by itself. But if someone tricks you into renaming a dangerous file to .exe, then yes, it becomes a problem. This is why Windows hides extensions — so people cannot accidentally run files they think are harmless. Never rename a file to .exe unless you are absolutely certain what it is.

Can I change multiple file extensions at once?

Most file managers do not let you rename multiple files at once by changing their extensions. You have to rename them one at a time. Some advanced tools and batch rename programs can do this, but they are not built into Windows, Mac, or Linux by default. For most users, renaming one file at a time is the safest approach.