Show file extensions for all files on Mac
Make Finder display .pdf, .docx, .png and every other extension at all times.
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 Finder02What 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
04Undo
Undo
$ defaults write NSGlobalDomain AppleShowAllExtensions -bool false && killall Finder05Sources
- macOS defaults command referenceEvidence: 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
Show the path bar in Finder on Mac
Permanently display the full folder path at the bottom of every Finder window.
Reset the Launchpad layout on Mac
Restore Launchpad to its default, alphabetically sorted icon grid.
Change where screenshots are saved on Mac
Point macOS screen captures at any folder you choose instead of the desktop.