How To Prevent Safari from Opening Downloaded Files

October 2016

Safari automatically opens downloaded files it considers as Safe. It may include compressed files, PDF, pictures, videos, and other type of files downloaded from trusted sources. But sometimes, the so-called safe files may contain viruses or malware.

You might want to turn off this feature (enabled by default) for your own good. It can be done from Safari's preferences or through a simple terminal command.

Turn Off "Auto Open Safe Download" in Safari

Launch Safari, click on the Safari menu > Preferences. Go to the General tab and clear the Open "safe" files after downloading checkbox.

Turn Off "Auto Open Safe Download" from the Terminal

To turn off the auto-open function from the terminal, simply open a terminal and run the following command:
defaults write AutoOpenSafeDownloads -boolean NO

Related :

This document entitled « How To Prevent Safari from Opening Downloaded Files » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.