Show file extensions for all files on Mac

Make Finder display .pdf, .docx, .png and every other extension at all times.

macOSFilesFinderdefaultsMedium risk
Run the command below — Finder restarts and every file shows its extension, including files that had "hide extension" checked.

01Command

Command
$ defaults write NSGlobalDomain AppleShowAllExtensions -bool true && killall Finder

02What it does

The AppleShowAllExtensions key in the global preference domain overrides the per-file "hide extension" flag. Setting it to true and restarting Finder makes every filename show its suffix, which helps you spot look-alike files such as invoice.pdf.exe before opening them. The same settings pane in Finder is Options → Advanced → Show all filename extensions.

03Risk

RiskMedium risk
CompatibilitymacOS 10.11 El Capitan – 15 Sequoia

04Undo

Undo
$ defaults write NSGlobalDomain AppleShowAllExtensions -bool false && killall Finder

05Sources

  • macOS defaults command reference
    SS64 · technical · 2026-09-16
    Evidence: AppleShowAllExtensions in the global domain toggles extension visibility for all files; Finder restart applies it.

Last verified: 2026-09-16 · Category: System & Settings

06Related solutions