everyday mac tools

Show file extensions for every file on a Mac

· 6 min read

To show file extensions for every file on a Mac, open Finder, choose Finder > Settings (Finder > Preferences on older versions of macOS), click Advanced and turn on “Show all filename extensions”. Every file in every Finder window, on the desktop and in Open and Save dialogs now shows its full name, .pdf, .heic, .zip and all.

That one checkbox solves most of the problem. The rest of this article covers the per-file setting that can make extensions look inconsistent, why seeing them matters more than it seems, and what actually happens when you change one.

The Finder setting, step by step

  1. Click an empty spot on the desktop or any Finder window so Finder is the active app.
  2. Press Command-comma, or choose Finder > Settings from the menu bar.
  3. Click the Advanced tab.
  4. Tick “Show all filename extensions”.

The change is immediate. You do not need to relaunch Finder or log out.

While you are on that tab, look at “Show warning before changing an extension”. Leave it on. It is the prompt that asks whether you really meant to rename report.docx to report.doc, and it catches more slips than it causes annoyance.

Why some files hid their extension in the first place

With “Show all filename extensions” turned off, macOS decides per file. Each file carries a small flag that says whether its extension should be hidden, and that flag gets set in a few places you might not notice:

  • Save dialogs. Many apps show a “Hide extension” checkbox at the bottom of the Save sheet. If it was ticked when you saved, the file remembers.
  • Get Info. Select a file, press Command-I, and open the “Name & Extension” section. There is a “Hide extension” checkbox for that one file.
  • Files from other people. Files copied from another Mac can arrive with the flag already set.

This is why a folder can look inconsistent, with some files showing .pdf and others not. The global setting overrides all of it: once “Show all filename extensions” is on, the per-file flag is ignored and every extension appears. If you only want to reveal one file’s extension, untick “Hide extension” in its Get Info window instead.

Why it is worth seeing extensions

Hiding extensions makes a folder look tidy. It also removes information you regularly need.

Spotting a disguised file. A file named invoice.pdf with a hidden extension could really be invoice.pdf.app, and Finder would show only the first part. The icon helps, but icons can be copied. With every extension visible, the real type is right there in the name. Phishing that targets Mac users goes further into the tricks that rely on you not looking closely.

Knowing what you are about to send. A photo from an iPhone is often .heic, which some people and some websites cannot open. A screen recording is .mov. A document exported in a hurry might be .pages rather than .pdf. Seeing the extension before you attach something saves a reply asking what the file is.

Working with files that share a name. notes.txt, notes.md and notes.rtf look identical with extensions hidden. When you are searching, sorting or cleaning up a folder, the extension is often the only thing that tells two files apart. If you find yourself hunting for everything of one type, find files by extension on a Mac covers doing that across the whole disk.

Changing an extension does not convert the file

This is the part that confuses people once extensions become visible. Renaming photo.heic to photo.jpg does not turn it into a JPEG. The contents stay exactly as they were; you have only changed the label. Some apps will read the real format anyway and open it, others will refuse or show an error, and a website that checks the file may reject it.

To actually change a format, open the file in an app that can export it. For images, Preview’s File > Export lets you pick JPEG, PNG, HEIC or TIFF. For documents, the app that created the file usually has File > Export To. For many files at once, Finder’s Quick Actions include Convert Image when you right-click a selection of photos.

The honest use for renaming an extension is fixing a file whose extension is genuinely wrong, for example a download that arrived as file with no extension at all, where you know what it really is.

Doing it from Terminal, and doing it reversibly

The Finder checkbox writes a single preference. If you manage several Macs or keep a setup script, you can set it from Terminal:

defaults write NSGlobalDomain AppleShowAllExtensions -bool true

Then run killall Finder so Finder picks it up. To undo it, run the same command with false, or delete the key with defaults delete NSGlobalDomain AppleShowAllExtensions. What defaults write does and how to undo one safely explains the command properly before you start pasting others you find online.

If you would rather not keep track of commands like that, Mainspring lists “all file extensions” among its power-ups, alongside related Finder settings such as showing hidden files and folders on top. Each one is a real macOS setting that Mainspring snapshots before changing, so it flips back in one click. For this single checkbox the Finder setting is quicker; the app earns its place when you are changing a handful of Finder settings at once and want them all reversible. The Finder Power recipe applies a set of them together.

Related Finder settings people change at the same time

Once extensions are visible, a few neighboring settings tend to follow:

  • Hidden files. Press Shift-Command-period in any Finder window to toggle files that start with a dot. Show hidden files in Finder and hide them again has the details.
  • Folders on top. In Finder Settings > Advanced, “Keep folders on top” has options for windows sorted by name and for the desktop.
  • The path bar. View > Show Path Bar puts the folder chain at the bottom of every window.

Questions

Why can I still not see extensions in some apps’ file lists? The Finder setting covers Finder and the standard Open and Save dialogs. An app that draws its own file browser decides for itself. Check that app’s settings.

Will showing extensions break anything? No. It changes only how names are displayed. Files, links and apps behave exactly as before.

Why does a file with a visible extension still show a generic icon? Either no installed app claims that type, or the extension does not match the contents. Select it and use Get Info’s “Open with” section to choose an app, or check where the file came from before opening it.