How to change a file type

A file type is the format a file is saved in — it tells your computer what program should open it and how to read its contents. You change a file type by renaming the file extension, which is the three or four letters after the dot at the end of the filename. On Windows, you rename the extension directly. On Mac, you use the Get Info window. The method depends on your operating system and whether your computer is currently hiding file extensions from view.

Changing a file type works best when you are converting between formats that hold the same kind of information — for example, turning a JPEG image into a PNG, or a Word document into a PDF. Simply renaming the extension does not actually convert the file's contents; it only tells your computer to treat it differently. If you rename a Word document to end in .pdf, your computer will try to open it as a PDF, but the file will not actually be a PDF and will likely fail to open or display correctly.

Key Takeaways

  • File extensions are the letters after the dot in a filename, and changing them tells your computer what program should open the file.
  • On Windows, you must first turn on the option to show file extensions, then right-click the file and rename it with the new extension.
  • On Mac, right-click the file, select Get Info, and change the extension in the Name field, then confirm you want to change it.
  • Renaming an extension only works reliably when converting between similar formats; renaming a Word document to .pdf will not actually create a working PDF.
  • If you need to truly convert a file to a different format, use the program that created it or a dedicated conversion tool.

How to show file extensions on Windows

By default, Windows hides file extensions to make filenames look cleaner. Before you can rename an extension, you need to turn this setting off. Open File Explorer and click the View tab at the top of the window. Look for a checkbox labeled "File name extensions" and click it to turn it on. From that point forward, you will see the full filename including the extension on your computer.

Once extensions are visible, you can see what format each file is actually in. A document might show as "resume.docx" instead of just "resume", and an image might show as "photo.jpg" instead of just "photo". This visibility stays on until you turn it back off, so you only need to do this once.

How to change a file extension on Windows

After you have turned on file extensions, right-click the file you want to change. Select "Rename" from the menu that appears. The entire filename, including the extension, will become editable. Use your keyboard to move to the end of the filename and change only the extension — the part after the dot. For example, change "photo.jpg" to "photo.png" or "document.docx" to "document.txt".

Press Enter when you are done typing. Windows will ask you to confirm that you want to change the file extension. Click "Yes" to proceed. The file icon may change to reflect the new format, but the file's actual contents remain unchanged — you have only told Windows to treat it as a different type.

How to change a file extension on Mac

Mac does not hide file extensions by default, so you can usually see them right away. To change one, right-click or Control-click the file and select "Get Info" from the menu. A window will open showing details about the file. Look for the "Name & Extension" section near the top. Click in the Name field and edit the extension at the end of the filename. For example, change "photo.jpg" to "photo.png".

After you change the extension, close the Get Info window. Mac will ask whether you want to use the new extension. Click "Use [new extension]" to confirm. Like Windows, this only renames the extension — it does not convert the file's actual contents to the new format.

When renaming an extension actually works

Renaming an extension works reliably when you are converting between formats that store the same type of data in a compatible way. Converting an image from JPEG to PNG, or from PNG to BMP, usually works because all three are image formats that store pixel data. Similarly, you can often rename a text file from .txt to .csv (comma-separated values) if the contents are already formatted as comma-separated data, because both are plain-text formats.

The conversion works because the underlying data structure is already correct for the new format. Your computer simply needs to be told to read it differently. However, this does not work for complex formats like Word documents, PDFs, or video files, where the internal structure is specific to that format. Renaming a .docx file to .pdf will not create a working PDF — it will create a file that neither program can open properly.

How to actually convert a file to a different format

If you need to truly convert a file from one format to another — such as turning a Word document into a PDF, or an MP4 video into an MOV — use the program that created the file. Open the file in its original program, then look for an "Export As" or "Save As" option in the File menu. Choose the format you want to convert to and save the file with a new name. The program will handle the actual conversion, not just the filename change.

For formats that do not have an obvious source program, or for batch conversions of many files at once, online conversion tools and desktop software are available. These tools read the file in its original format and write it out in the new format, doing the actual work of conversion. A simple filename change cannot do this work.

What happens if you rename a file to the wrong extension

If you rename a file to an extension that does not match its actual contents, your computer will try to open it with the program associated with that extension. The program will usually fail because the file's internal structure does not match what the program expects. You might see an error message, or the file might open but display as garbled text or corrupted data.

If this happens, you can simply rename the file back to its original extension. The file itself is not damaged — only the label has changed. Once you restore the correct extension, the file will open normally again in the program that understands its format.

Frequently Asked Questions

Can I change a file extension to make my computer open it with a different program?

Yes, but only if the new program can actually read that file format. Changing a .txt file to .pdf will not make it open in a PDF reader — the file is still plain text. However, you can change a .jpg to .png and open it in any image viewer, because both formats store image data that any image program can read.

Will changing a file extension delete or damage the file?

No. Renaming the extension only changes the label your computer sees; it does not alter the file's contents. If you rename it incorrectly and the file will not open, you can rename it back to the original extension and it will work again.

Why does Windows hide file extensions by default?

Windows hides extensions to make filenames look simpler and less technical for everyday users. However, this can make it harder to understand what format a file is in, which is why many people turn the setting on. Hiding extensions also makes it slightly harder for malware to disguise itself by using misleading filenames.

Can I change multiple file extensions at once?

Windows and Mac do not have a built-in way to batch rename extensions. You can rename files one at a time, or use third-party batch renaming tools if you need to change many files. Be careful with batch tools — renaming the wrong extension on many files at once can make them all unreadable.

What if I need to convert a file but do not have the original program?

Online conversion websites and free desktop software can convert many common formats without requiring the original program. Search for "[your file format] to [desired format] converter" to find tools. Be cautious with online tools if the file contains sensitive information, since you are uploading it to an external server.