If you want to make a ZIP file on your Mac, there are various ways to do so. macOS offers built-in tools, but there are also third-party apps to let you create ZIP archives on your Mac.
This guide takes a look at what a ZIP file is, and how you can make one in macOS.
What Is a ZIP File?
A ZIP file is a compressed archive containing multiple files. It uses ZIP as its file extension. You can take an entire directory structure and “zip it up” in one file, hence the name.
There are many reasons to create a ZIP file. The most common one is when you want to reduce the size of your files. Since a ZIP archive compresses your files, you get a smaller file size when you put your files into a ZIP archive.
The other reason people create a ZIP file is when they want to combine their files. Let’s say you have ten images to send. Instead of sending these one-by-one, you can put them all in a ZIP archive and send the archive as a single file instead.
How to Make a ZIP File Using Built-in macOS Tools
Like said above, macOS has built-in support for both extracting as well as making ZIP archives. This feature is built right into Finder and you can access it from the context menu (there are apps to further enhance Finder’s functionality).
Here’s how to create a ZIP archive in macOS:
- Keep all of the files you want to add to your ZIP archive in a single folder.
- Open the folder containing your files in Finder.
- Select the files you want to add to the ZIP archive, right-click on any one file, and select Compress X Items (where X is the number of items you’ve selected).
- macOS will create a ZIP file with all your selected files in it. This ZIP will be placed in the same folder as your original files.
If you want to see how much space you’ve saved by compressing your files in a ZIP, you can do a quick comparison by right-clicking your ZIP and selecting Get Info. Use the file size there and compare it with the original size of your files.
If you need to extract your ZIP, double-click on the ZIP and macOS will extract its contents to a folder.
How to Create a ZIP File Using the Mac Terminal
Another way to make a ZIP file on a Mac is to use the Terminal. There’s a command you can use in this utility to create a ZIP containing your specified files.
If you prefer commands over graphical user interfaces, this should be your go-to choice for making ZIPs on macOS. This also lets you create ZIP archives with files from different directories without having to move them into a single folder first.
Create a ZIP File With the Terminal
This procedure creates a ZIP file without password-protection using the Terminal:
- Open the Terminal on your Mac.
- Use the cd command to get to the folder where the files you want to add to your ZIP are located.
- Once you’re in that folder, use the following command to make a ZIP. In the command below, sample.zip is the name of the output ZIP and mydocument.txt is the file to be added to the ZIP.
zip sample.zip mydocument.txt
- The Terminal will create and place the ZIP archive in your current folder.
Create a Password-Protected ZIP File Using the Terminal
The Terminal actually lets you create password-protected ZIP files. This way, when someone tries to extract the contents of your ZIP archive, they need to enter the correct password before they can do so.
You can make a secure ZIP archive in the Terminal as follows:
- Launch the Terminal.
- Use cd to go to the folder where your source files are located.
- Type the following where secure.zip is the resulting ZIP file, and passwords.txt is the file to be added to the ZIP.
zip -er secure.zip passwords.txt
- As soon as you hit Enter, the Terminal asks you to enter the password for your new ZIP file. Type the password and hit Enter; you need to do this twice. Also, keep in mind you won’t see your password while you’re typing it in the Terminal.
- Your password-protected ZIP file should now be ready.
Unzip a ZIP File Using the Terminal
You can use the Terminal to unzip ZIP archives as well:
- Open a Terminal window.
- Type the following and press Enter. Make sure to replace myarchive.zip with the actual name of the ZIP you want to extract.
unzip myarchive.zip
- The Terminal should decompress all the contents of your ZIP.
How to ZIP Files on Your Mac Using a Free Third-Party App
The built-in methods aren’t the only way to make ZIPs on a Mac. You have a few apps as well that you can use to build and extract archive files on your Mac computer.
One of these apps is B1 Free Archiver that lets you make ZIP files as well as its own B1 archive file format.
Here’s how you use this app to make an archive:
- Download, install, and launch the B1 Free Archiver app on your Mac.
- Select the files you want to add to your archive using the built-in file manager.
- Click Create at the top.
- Click Browse to select a folder to save your archive, choose a format from the Archive format menu, and hit Start.
- Optionally, you can configure other options like splitting your archive into several parts and using a different compression mode.
Archive Files: They’re For More Than Just Compressing Files
There are plenty reasons to use ZIP on your Mac. With multiple ways to make ZIP archives in macOS, you can quickly and easily put all your individual files into one compressed archive.
Of course, even ZIP files can get on the large side. If you’re dealing with situations where you need files to remain under a certain size, you might need to turn to another type of archive files. We haven’t covered RAR files in this article, but you can split these into parts to get by arbitrary file size limitations.