Home » Tech Tips » Mac » How to Zip and Unzip Files with Password in Mac?

How to Zip and Unzip Files with Password in Mac?

Zip format is the easy way to compress multiple files into a single archive file. This not only saves space by reducing size but also allows you to send restricted files over emails. For example, you can compress an .exe file and send in Gmail as a zip archive. If you are using Mac, here is how you can zip and unzip files without any third-party apps. It is also possible to set a password protection for you zip files in Mac.

Zip and Unzip in Mac

Nowadays, all operating systems like Windows, iOS, Android and macOS come with in-built zip/unzip feature. Though you have an Archive Utility app in macOS, you do not need to open the app for extracting or compressing the files.

1. Zip Files in Mac

It is possible to compress single or multiple files at once in Mac.

  • Select a file or press shift key and select multiple files in Finder app.
  • “Command + Click” or right click on the selected items and select “Compress” from the menu. Alternatively, select “File > Compress” from Finder’s app menu.
  • If you have selected single file, then you will see the menu shows “Compress File_Name”.  Otherwise, you will only see “Compress” in the menu.
Compress Single or Multiple Files in Mac
Compress Single or Multiple Files in Mac
  • All the selected files will be instantly archived with the file name as “Archive.zip”.
Archive Zip File Created
Archive Zip File Created

For renaming the zip file, select the archive.zip, press enter key and type the new file name as you like.

1.1. Unzip Files in Mac

Simply double click on the zip archive file and Mac will extract the content and show the archive folder.

Extract Zip File in Mac
Extract Zip File in Mac

2. Using Archive Utility in Mac

Most Mac users do not know that the system comes with a default app called Archive Utility. The reason is that you can’t find the app neither in “Applications > Utilities” nor in “Launchpad > Other” folders. As far as we see, the only way is to search with Spotlight Search and open the app. Otherwise, you can open the Archive Utility app from its location “Macintosh HD > System > Library > CoreServices > Applications > Archive Utility”.

Archive Utility Location in Mac
Archive Utility Location in Mac

It does not have any interface as such, you need to use the menu items from the top bar after opening the app.

  • After opening the app, go to “File > Create Archive” menu or press “Command + K” shortcuts.
Archive with Archive Utility App in Mac
Archive with Archive Utility App in Mac
  • You will see an open dialog box and select a file for archiving. This app does not allow selecting multiple files; hence you need to select a single file or folder and click “Archive” button. If you have multiple files, first create a new folder, and put all the files inside so that you can select the folder for archiving.
Select File in Archive Utility App
Select File in Archive Utility App
  • After that, you can find the compressed file in the same original file’s location. You will be surprised that the archive file will be with .cpgz extension (and not .zip) which is a compressed archive format.
Expand CPGZ Archive in Mac
Expand CPGZ Archive in Mac
  • For extracting the file, go back to Archive Utility app and go to “File > Expand Archive” menu. Or press “Command + U” shortcut keys and locate the .cpgz archive file. Click “Expand” button to extract the file in the same location.

2.1. Customizing Archive Utility App

As mentioned, do not surprise with .cpgz format. You can change the archive format and other settings in the app. When you are in app, go to “Archive Utility > Settings…” menu or press “Command and Comma” keys. This will open app’s settings and you can change the followings:

Archive Utility App Settings
Archive Utility App Settings
  • Save expanded files – by default expanded files will be saved in original file/folder’s location. Click the dropdown and select “into…” option and then select the location for saving the files in that location.
  • After expanding – by default, the app will leave the original archived files alone. However, you can choose to delete the files permanently or move to trash. You can also decide whether to show the expanded items in Finder and keep expanding the sub-folders if possible.
  • Save archive – you can save the compressed file in original file/folder’s location or set the default location for saving.
  • Use archive format – compressed archived or .cpgz is the default format used by the app. If you want to change, click the dropdown, and select one of the other formats – regular archive, Zip archive, Apple Archive, Apple Encrypted Archive.
  • After archiving – after archiving you can leave the file alone, move to trash or delete permanently. You can also select the “Reveal archive in Finder” option to open the location after creating an archive.

2.2. Set Password for Archive Files in Mac

Apple Encrypted Archive format allows to set a password for your compressed archive file. When creating an archive, enter the password for protecting the file. You can also choose to save the password in Keychain.

Type Password When Creating Archive File in Mac
Type Password When Creating Archive File in Mac

The password protect archive file will be with .aea file extension indicating it’s an Apple Encrypted Archive file.

Create Encrypted Archive File in Mac
Create Encrypted Archive File in Mac

If you are opening the password protected file in the same Mac, it is possible to unlock with system admin password. If someone else is opening the file in other Mac, they need to enter the set password. So, if you are sharing a Mac with family members or others, then this is not an option as anyone having admin password can unarchive the file. Learn more about protecting folders with password in Mac.

Enter Password or Use Touch ID to Open Encrypted Archive File in Mac
Enter Password or Use Touch ID to Open Encrypted Archive File in Mac

3. Using Third-Party Apps for Unzipping Files

Sometimes, Mac’s default archive options will not work when you try to extract a zip file. It could be due to lengthy file name, or the archived file has different encoding. In such a case, you can try with third-party apps like The Unarchiver.

  • Go to App Store and install The Unarchiver app.
  • Whenever launching, the app will show you the preferences or settings pane.
  • You can choose the supported archive format under “Archive Formats” tab and set the preferences for extracting under “Extraction” section.
The Unarchiver Archive Formats
The Unarchiver Archive Formats
  • Under “Advanced” section, you can choose the threshold lower than 80% so that the app will prompt you to choose the encoding when you extract files.
Set Threshold for Encoding in The Unarchiver App
Set Threshold for Encoding in The Unarchiver App

Final Words

The simple way to zip and unzip files in Mac is to use the right-click context menu in Finder app. However, Archive Utility app will be useful once you customized the settings and wanted to encrypt the zip file. If default extraction does not work for any reasons, then you can try The Unarchiver app with different encoding.

Leave a Comment

Your email address will not be published. Required fields are marked *