Is there any way to globally hide every single file extension in OS X? I've seen the option in the Get Info menu to hide the selected file's extension, but I'd like to never see a file extension unless I chose to.

3 Answers 3


I use Hazel with an applescript to keep my filename extensions hidden. Hazel is just a way to make sure that anytime I create a new file, the applescript gets run on it. The applescript is pretty easy -- you can see all three lines of it in the screenshot below. I also like to set the color labels by file type, thus the selection of only PDFs and the red color labels. You can skip both of those if you like.

enter image description here

Just to be clear, you don't need to use Hazel. You could use folder actions or an automator workflow to initiate the applescript on the files you want to change.


In the Finder, selected the Preferences menu item from the Finder menu. Click the Advanced Tab. Make sure to un-check Show all filename extensions. Close the window.

Finder Preferences

I had thought this was unset by default, but perhaps not.

  • 1
    Individual files can still set a flag to show their file extension. This is more like "Always show filename extensions" vs. "Respect the individual file's preference". (I think the OP is looking for "Disregard individual files' preferences and never show filename extensions.")
    – mipadi
    Commented Mar 7, 2011 at 16:38
  • Precisely, I've already unchecked that option in Finder Preferences, but some files still show file extensions, .avi's, for instance. Commented Mar 8, 2011 at 16:33
  • 2
    when I uncheck this option, there is no effect. Actually all my ".pdf, .doc, .pages" and so on are shown with extensions. Is there a way to hide all extensions in Mac OS X Lion?
    – user10429
    Commented Aug 28, 2011 at 11:04
  • I've always kept showing all filename extensions checked. After unchecking it, most files are still shown with extensions on 10.8, even after restarting. I don't think that happened on 10.6 (or 10.7?). Can anyone else reproduce it?
    – Lri
    Commented Aug 16, 2012 at 20:40

The only correct answer is that you should not be doing what you are trying to do.

Hidden file extensions is a serious security hole. If you allow file extensions to be hidden, someone can create an application and name it:


and on your machine, you will see a file named:


possibly even with a PDF icon. Your first thought will not be, "Why is the extension showing?" but rather, "Oh, that's just a PDF file. It's safe to open it." And that's when your machine becomes a zombie in a botnet.

You should always leave the "Show all filename extensions" checkbox checked. It's really the only way to be completely safe from those sorts of trojans.

  • 1
    Doesn’t macOS ignore the extension and use the file creator code when present to determine how the file is handled? If so, the security risk is still there with extensions visible. Commented Sep 17, 2020 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .