What changing a file type actually means

Changing a file type means renaming the file extension — the letters after the dot at the end of a filename. A file called document.txt has the extension .txt. If you rename it to document.pdf, you have changed its extension to .pdf. The operating system uses this extension to decide which program opens the file.

This is different from converting a file, which changes what is actually inside it. Renaming a .txt file to .pdf does not turn the text into a real PDF — it just tells your computer to try opening it with a PDF reader, which usually fails. Real conversion requires software that reads the old format and writes the new one.

You might want to change an extension when you have a file the wrong program is opening, when you need to send a file in a specific format, or when a file lost its extension and you need to restore it so the right program recognizes it.

Key Takeaways

  • On Windows, right-click a file, choose Rename, change the letters after the dot, and press Enter — but you must turn on "Show file extensions" in File Explorer settings first.
  • On Mac, click a file once, press Return (or Command+Enter), change the extension, and click Rename in the dialog that appears.
  • On Linux, right-click a file in your file manager, choose Rename, change the extension, and press Enter.
  • Changing the extension does not convert the file's contents — it only tells your computer which program to use; real conversion requires software designed for that format pair.
  • If you are unsure whether to change an extension, check what program currently opens the file and what format that program can save to.

How to change a file extension on Windows

Windows hides file extensions by default, so you must turn this on first. Open File Explorer, click the View tab at the top, and check the box next to "File name extensions." Now you will see the full filename including the dot and letters at the end.

Find the file you want to rename, right-click it, and choose Rename. The entire filename will highlight. Use the arrow keys to move to the extension (the part after the last dot), delete the old letters, and type the new extension. For example, change photo.jpg to photo.png. Press Enter when you are done.

Windows will ask if you are sure you want to change the extension. Click Yes. The file now has the new extension, though its actual contents have not changed — only the label your computer reads.

How to change a file extension on Mac

On Mac, click the file once to select it. Then press Return (or Command+Enter on some versions). The filename becomes editable. Change the extension by deleting the old letters after the dot and typing new ones.

When you press Return again, a dialog box appears asking whether you want to keep the old extension or use the new one. Click "Use the new extension" to confirm. If you see a warning that changing the extension may make the file unusable, that is normal — it is just telling you that the program may not recognize it anymore.

How to change a file extension on Linux

In most Linux file managers (like Nautilus, Dolphin, or Thunar), right-click the file and choose Rename. The filename becomes editable. Change the extension by deleting the old letters after the dot and typing the new ones, then press Enter.

Some Linux file managers do not show extensions by default. If you do not see the dot and letters, open the file manager's preferences or settings menu and look for an option like "Show hidden files" or "Show file extensions," then enable it.

When changing an extension actually works

Changing an extension works when the file's actual contents are already in the format you want, but the extension is wrong or missing. For example, if you have a text file that is actually formatted as CSV (comma-separated values) but named data.txt, renaming it to data.csv will let spreadsheet programs open it correctly.

It also works when you want to force a different program to open a file. If a .txt file usually opens in Notepad but you want it to open in Word, you can rename it to .doc, though Word may warn you that the format does not match the extension.

Changing an extension does not work if you need the file in a genuinely different format. A .jpg photo file renamed to .png is still a JPG inside — it will not have PNG's features, and many programs will refuse to open it. To convert between formats, you need software designed for that pair: image editors for photos, document converters for text, video software for media files.

What to do if you are not sure about the format

Before changing an extension, find out what format the file is actually in. Right-click the file, choose Properties (Windows) or Get Info (Mac), and look at the "Type" or "Kind" field. This tells you what the file really is, separate from what the extension says.

If the type and extension do not match, and you need them to match, then changing the extension is the right move. If you need to change what is inside the file — turning a JPG into a PNG with different colors, or a Word document into a PDF with different formatting — you need conversion software, not just a rename.

Common extension changes and what they mean

Old ExtensionNew ExtensionWhen This Works
.txt.csvThe text file is already comma-separated; you just need the right extension so spreadsheet programs recognize it.
.jpg.jpegAlways works — these are the same format with different extension names.
.mov.mp4Only if the file is actually MP4 video inside; renaming alone will not convert the codec or container.
(no extension).pdfOnly if the file is already a PDF; you are just adding the label back.
.doc.docxOnly if the file is already in the newer format; older .doc files will not open correctly as .docx.

Frequently Asked Questions

Will changing the extension break the file?

Changing the extension alone does not damage the file's contents. If the new extension does not match what is actually inside, programs may refuse to open it or display it incorrectly, but the original data is still there. You can always change the extension back.

Can I change a file extension to make it open in a different program?

Yes, if that program can read the format inside the file. Changing a .txt file to .doc will make it try to open in Word, but Word may warn you the format is wrong. If you want Word to actually edit the file properly, you need to convert it using Word itself — open the .txt file in Word, then save it as .doc or .docx.

What if I change the extension and the file will not open?

Change the extension back to what it was before. The file is not damaged — your computer just could not find a program that recognizes the wrong extension. Once you restore the correct extension, it should open normally again.

Is there a difference between .jpg and .jpeg?

No, they are the same format. You can rename between them freely with no loss of quality or data. Some older programs prefer one or the other, but modern software handles both identically.

How do I actually convert a file to a different format?

Use software designed for that conversion. For images, use Photoshop, GIMP, or online converters. For documents, open the file in the program that created it and use Save As to choose a new format. For video, use dedicated video software like HandBrake or Adobe Media Encoder. Renaming the extension alone will not do this.