How to Zip and Unzip Files on Mac

Compress files and folders into a zip archive from Finder or Terminal, and extract zip files you receive, without installing any extra software.

You need to send a folder as one file, or someone sent you a .zip and you need what is inside. macOS handles both in Finder with no extra software. Terminal gives the same result when you want more control.

Select the files in Finder

Open Finder and click the file or folder you want to compress. To include several items, hold Cmd and click each one, or drag a box around them.

Choose Compress

Right-click (or Control-click) the selection and choose Compress. The menu item shows the item name for a single file, such as Compress "Report.pdf", or Compress 3 Items for a group. A new .zip appears next to the originals. A single item becomes Name.zip, and a group becomes Archive.zip. The originals are left in place.

Unzip by double-clicking

Double-click any .zip file. Archive Utility extracts the contents into the same folder as the archive and leaves the .zip where it was. If you want the archive gone afterwards, drag it to the Trash.

Zip from Terminal

Open Terminal from Applications, Utilities. Move into the folder that contains what you want to compress, then run:

zip -r archive.zip foldername

The -r flag includes everything inside the folder. For a single file, drop the -r. To add several items, list them after the archive name separated by spaces.

Unzip from Terminal

In the folder that holds the archive, run:

unzip archive.zip

The contents extract into the current folder. To extract somewhere else, add -d followed by the destination path:

unzip archive.zip -d ~/Desktop/extracted

If you need a password on the archive. Finder cannot do this, but Terminal can. Run zip -er archive.zip foldername and type a password when prompted. Anyone opening the archive, on Mac or Windows, is asked for that password. Send the password by a different channel than the file.

If a .zip will not open. The download may be incomplete. Check the file size against the original and download it again. Archives made on Windows sometimes contain a hidden __MACOSX folder or odd filenames, which are harmless.

More Mac how-tos