By 5 min read

How to Show and Change File Extensions on Windows and Mac

Windows and macOS hide file extensions by default, which is why a file 'with no extension' often has one you cannot see. How to turn them on, how to change one safely, and what changing it does not do.

Identify a file with no extension

Drop the file and its format is read from the signature in the bytes, not the name. You can then save a copy with the correct extension.

Open the file identifier

The file is read in your browser and never uploaded.

Most reports of "a file arrived with no extension" turn out to be a file that has one you cannot see. Windows and macOS both hide known extensions out of the box. Whether you cannot open the file, cannot tell what it is, or want to put the right extension back, making them visible is where to start.

What an extension actually is

The extension is the part of the file name after the last dot: pdf in invoice.pdf, heic in photo.heic.

The point to hold on to is that an extension is only part of the name. It is separate from the contents and anyone can change it. It matters anyway because Windows and macOS decide which application opens a file from those few characters alone. With no extension nothing happens; with the wrong one, the wrong application tries and fails.

Showing them on Windows 11

  1. Open File Explorer (the folder icon on the taskbar, or Windows key + E).
  2. Click View in the toolbar along the top.
  3. Hover over Show at the bottom of the menu.
  4. Tick File name extensions.

The setting applies to every folder and persists. Ticking Hidden items in the same menu also reveals files such as .DS_Store. It will not reveal Thumbs.db: that one carries the system attribute as well as the hidden one, so you also have to clear Hide protected operating system files in Folder Options. Current versions of Windows only create Thumbs.db on network folders anyway, so a local folder normally has none.

Showing them on Windows 10

  1. Open File Explorer.
  2. Click the View tab on the ribbon.
  3. Tick File name extensions on the right.

If the ribbon is collapsed, the small chevron at the top right of the window expands it. Windows 8.1 works the same way.

Showing them on a Mac

  1. Bring Finder to the front by clicking the desktop.
  2. Choose Finder, then Settings from the menu bar (Preferences on macOS Monterey and earlier).
  3. Open the Advanced tab.
  4. Tick Show all filename extensions.

For a single file, selecting it and pressing Command + I shows the full name including the extension without changing any setting.

Changing one, and when that is the right move

Once extensions are visible, changing one is just renaming. Press F2 on Windows or Return on a Mac and edit the part after the dot. Windows warns that the file might become unusable; if you meant to do it, go ahead.

Renaming is the right move only when the contents are correct and the extension is wrong or missing. For example:

  • An email attachment arrived as ATT00001 with the extension stripped.
  • A download picked up an extra .txt, as in data.csv.txt.
  • The sender renamed it deliberately to get past a filter, such as .zip sent as .zi_.

What renaming never does is convert between formats. Renaming photo.heic to photo.jpg does not produce a JPEG; it produces a HEIC that the image viewer refuses. Conversion needs a converter.

Renaming does not change the contents

This is the part that trips people up. Changing an extension rewrites the name and nothing else; the bytes are untouched. Which means both of these are true at once:

  • A wrong extension does not damage the file. Put the right one back and it opens as before.
  • A new extension does not change the format. If the contents are still HEIC, calling it .jpg does not make it a JPEG.

The same property gets abused. A file named invoice.pdf.exe reads as invoice.pdf while extensions are hidden, and it is a program. That is one very practical reason to leave them switched on.

When there really is no extension

If the setting is on and the file still has no extension, it genuinely has none. Mail systems strip them, and files sent from a Mac sometimes lose them on the way to Windows.

In that case the name tells you nothing. Most formats do start with a fixed byte sequence — a signature — that identifies them regardless of the name. Drop the file into the file identifier and it reads that, then offers to save a copy with the right extension. The file never leaves the browser.

Summary

  • Windows and macOS hide extensions by default, so "no extension" usually means not shown.
  • Windows 11: View, Show, File name extensions. Windows 10: the View tab. Mac: Finder Settings, Advanced.
  • Renaming an extension changes nothing inside the file — it neither breaks it nor converts it.
  • Rename only when the contents are right and the extension is wrong or missing.
  • For a file that genuinely has none, identify it from its contents.

Frequently asked questions

Can I show extensions on an iPhone or iPad?
Since iOS 16, yes. Open a folder in the Files app, tap the "…" button at the top right, then View Options, then Show All Extensions. With extensions shown, renaming a file lets you change its extension too. It is not a global setting like Windows or macOS — it applies to the folder you are looking at. If you only want to know what a file is, the file identifier is quicker.
I changed the extension but it still opens in the old app.
On Windows the existing association wins. Right-click the file, choose "Open with", then "Choose another app", pick the one you want and tick "Always use this app".

About the author

Ren

Developer, OpenedFile

I build and maintain OpenedFile on my own. It started when a winmail.dat attachment landed in my inbox and nothing would open it — and every online converter I found wanted me to upload the file to their server first. So I wrote a TNEF parser from scratch instead, and every tool here has run entirely in the browser ever since.

More about OpenedFile

Related Tools