How to Zip and Unzip Files on a Mac Without Third-Party Apps

Every Mac comes with a built-in tool for compressing and extracting files, so you never need to download WinZip, The Unarchiver, or any third-party app for basic archiving tasks. Whether you are trying to send multiple files by email, reduce a folder’s file size before uploading to cloud storage, or extract a ZIP file you have downloaded, macOS handles it all natively through the Finder and a command-line utility called ditto.

This guide covers everything from the simplest double-click extraction method to creating password-protected archives using Terminal.

How to Create a ZIP File on a Mac

Creating a ZIP archive in macOS requires nothing more than a right-click:

Compress a Single File or Folder

  1. Locate the file or folder you want to compress in Finder.
  2. Right-click (or Control-click) on it.
  3. Select Compress “[filename]” from the context menu.
  4. macOS will create a new file called Archive.zip in the same location as the original.

Compress Multiple Files or Folders into One ZIP

  1. Select all the files and folders you want to compress. Hold Command and click each item to build your selection, or drag to select a group.
  2. Right-click on any highlighted item.
  3. Select Compress [X] Items.
  4. macOS creates a single Archive.zip file containing all selected items.

To rename the archive, single-click the new ZIP file and press Return to edit the filename.

How to Unzip a File on a Mac

Extracting a ZIP archive is even simpler:

  1. Locate the .zip file in Finder.
  2. Double-click it.
  3. macOS automatically extracts the contents into the same folder as the ZIP file.

If the archive contains a single folder, that folder appears. If it contains multiple loose files, macOS creates a new folder to hold them.

Opening Other Archive Formats (RAR, 7z, tar.gz)

The built-in Archive Utility only handles ZIP files natively. For other common formats you may encounter:

  • .tar.gz and .tar.bz2: Double-clicking these in Finder will extract them using the built-in Archive Utility, as macOS has native support for gzip-compressed tarballs.
  • .rar: macOS cannot open RAR files without a third-party app. The free app The Unarchiver (available on the Mac App Store) handles RAR and many other formats reliably.
  • .7z: Similarly requires a third-party tool. The Unarchiver handles these as well.

Create a Password-Protected ZIP File Using Terminal

The Finder’s built-in compress function does not support password protection. To create an encrypted ZIP, you need Terminal:

  1. Open Terminal (go to Finder > Applications > Utilities > Terminal, or use Spotlight with Command + Space and type Terminal).
  2. Navigate to the folder containing the file you want to compress using the cd command. For example:
    cd ~/Desktop
  3. Run the following command, replacing protected.zip with your desired archive name and foldername with the file or folder to compress:
    zip -er protected.zip foldername
  4. Terminal will prompt you to enter and verify a password. The password is not displayed as you type.

The -e flag enables encryption and -r makes it recursive (includes subfolders). The resulting ZIP file will ask for the password whenever anyone tries to open it, on any operating system.

Extract a ZIP File Using Terminal

You can also unzip from Terminal, which is useful when working on servers or when you need more control over the extraction location:

  1. To extract to the current directory:
    unzip filename.zip
  2. To extract to a specific folder:
    unzip filename.zip -d /path/to/destination
  3. To list the contents of a ZIP without extracting:
    unzip -l filename.zip

Where ZIP Files Are Saved by Default

When you compress files in Finder, the resulting ZIP archive is saved in the same location as the original files. If you compress a file on your Desktop, the ZIP appears on the Desktop. When you download and extract a ZIP from the internet, the contents appear in the same folder as the downloaded file (usually Downloads).

Troubleshooting Common Issues

The ZIP file is corrupt or will not open:
This usually means the download was incomplete. Try re-downloading the file. If you received it via email, ask the sender to re-send it or use a file sharing service instead of an email attachment.

The extracted folder shows a __MACOSX folder:
This is a hidden metadata folder macOS automatically includes in ZIP files to preserve file attributes. It is harmless and invisible to users on a Mac. On Windows, it may appear as a folder. You can safely delete it.

Cannot compress because of a permission error:
You may not have write permission to the folder where the ZIP is being created. Try moving the source files to your Desktop before compressing them.

For everyday file sharing and archiving, the built-in compression tools in macOS are more than capable. You only need a third-party app when handling formats beyond ZIP, such as RAR or 7z.

Leave a Reply

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

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.

Receive our best articles and tips delivered straight to your inbox.