Zip and Unzip Files On a Mac

Learn how to zip and unzip files on your Mac, including how to create password-protected ZIP files. It is easy to compress a single file or multiple files and folders into a ZIP file archive on your Mac. You can also decompress any ZIP file by simply double-clicking it. The Archive Utility is used invisibly for both commands, and there are some settings you can access. If you want to create password-protected ZIP files, you can do it with the Terminal.
You can also watch this video at YouTube.
Watch more videos about related subjects: Finder (314 videos), Terminal (43 videos).

Video Transcript

Hi, this is Gary with MacMost.com. Let me show you how to zip and unzip files on your Mac. 
MacMost is  brought to you thanks to a great group of more than 1000 supporters. Go to MacMost.com/patreon. There you can read more about the Patreon Campaign. Join us and get exclusive content and course discounts.
So a Zip File is an archive containing one or more files. You would create a zip archive to make it easier to transport a group of files, say sending it to somebody else in an email message. It's easier to send one file than say a group of 30 or 40 files. This also compresses the files making them smaller. However, today most files are already really well compressed. If a document contains images they're probably compressed images like JPEG. If you have an audio file or video file it's probably already really well compressed. So you're only going to get a little bit more out of compressing a group of files into a Zip Archive. 
Now to create a Zip Archive it is pretty easy to do if you are using macOS Ventura, macOS Monterey, or even a few versions before that. There's a command you can get to right in the Finder. You can just select a file and then Control Click, right click or two-finger click on a trackpad, and then that brings up the Context Menu. Then go to compress. Simply select that and it will create a Zip Archive from the file you had selected. It will use the same name as the file. But you don't have to keep that same name. You can go in and change it to something else and the contents will remain unchanged. Whoever unzips it on the other end will end up with that file back regardless of what the actual zip archive is called. 
Now you can also select multiple files. I'm going to do that using the Command Key to select a second file and Command Key to select a third file. You could also use Shift to select a range. Now with anyone of those I can Control Click on it and choose Compress. It's going to create an archive using all the selected files. Notice it calls this Archived.zip which you can now easily rename. 
To Decompress zip files it's fairly simple. All you need to do is double click the file in the Finder. What it actually does is open the zip file in the default app which is an app you have on your Mac called Archive Utility. It's part of macOS. As a matter of fact if you Control Click here and you see Open With, you can see Archive Utility is the default. So if I double click you can see it quickly ran Archive Utility. What Archive Utility did was unzip it. Since I had selected several files to create this zip file it created a folder in the zip file and put the files in there. So by unzipping it I get that folder called Archive and inside I can see those three files. 
Now what if you wanted to use something else besides Archive. You can easily rename the zip file archive but how do you rename the folder inside it. Well all you need to do for that is actually create a folder. So here I've created a folder with three files in it. If I choose that folder and use Compress notice it calls the Zip File by the name of that folder. Just like it would do it if you selected one file. But now when you go to decompress it later, watch what happens. I get that folder that was inside of it back. It didn't need to create an archive folder to contain everything because it was just one item, that folder. So if you want to use something besides the archived.zip name with the archive folder inside it just create your own folder. Put the files in there and then zip that folder. 
Now there are some settings for this. The settings are actually in that Archive Utility. So use Spotlight with Command Space to find Archive Utility.app. Run it. Then you'll see here the Archive Utility only has two commands. Create Archive and Expand Archive. You can use Create Archive to select a file or folder and then create an archive like this. It's a lot easier to do it in the Finder though. You could also expand archive and select a zip file and expand it this way. Again it is easier to do this in the Finder by simply double clicking. But what running Archive Utility by itself does get you is some settings. If you go to Archive Utility Settings you'll see Unzip or Expansion settings here at the top and Zip or Archiving options here at the bottom. Only the Unzip options here at the top actually work with the Finder because the Compress command in the Finder is actually using some set options. So changing these, like changing where the archive is saved, isn't going to effect the Compress Command. But double clicking on a file actually runs Archive Utility and uses the settings here. So if you'd rather have expanded files go to a specific directory rather than into the same directory as the archive you can set that here. You could also change what happens after you expand the Zip Archive. Instead of leaving it there you can have it moved to the Trash, Delete It,  or Moved to a folder of your choosing. You can also choose whether or not the expanded items are selected after you Unzip and if Unzipping should continue. In other words if there is a zip file inside the zip file should it continue expanding all zip files until it is done or just do the top level Zip File and leave any zip files inside that as zip files. So if I change this to Move Archive to Trash and then I go to Expand this you'll see how  it works differently. It expands it. I get the results but that Zip File is now here in the trash. 
Now one thing we're missing with Archive Utility is the ability to make a Zip File that has a password set. It's encrypted. Well, if you go to Archive Utility Settings there's a Save Format here called Apple Encrypted Archive that will allow you to add a password and it will encrypt the file. But you won't get a zip file from it. You'll get an Apple Encrypted Archive which probably won't be useful unless you're sending it to somebody else also using a Mac. But you still can create a password protected Zip File on your Mac. You just need to use Terminal to do it. Now even if you don't like using Terminal this is a fairly simple task to do in Terminal. Let me show you. 
I'm going to use Spotlight to find and launch the Terminal App. So the first thing we want to do is we want to go to the Directory we are using right here. So I'm going to do cd for change directory. I'm going to drag in the folder icon from the Finder window here. This saves me from having to type this out. It's basically just my home folder, documents, files. So now I'm actually in this directory. Now it is much easier to work. I can do zip to zip the files. I can do dash and then e for encryption. This will prompt us for a password and encrypt the zip file with that password. r for recursion which means that if I include a folder, it's not just going to include the folder but the contents of the folder, and in fact if there is a folder inside that folder it will include the contents of that folder and so on. So in other words the normal way you would expect it to work. Now just give it a name for the archive. So I'll call it stuff.zip. Now I'll just type the names of the files I want to include. So let's do Test.rtf, let's do Test.numbers, and let's do Jack.jpeg. Let's include also the folder of stuff. I'm going to put that in quotes since there are spaces, like that. I could always have selected these items here and copied and then pasted the names. But I don't necessarily want to drag and drop because that gives me the full path there. That would actually create problems in the zip file because it's going to include that whole path. So let's just keep it simple like this. I'll hit Return. It's going to prompt for a password. So I'll enter it once. A second time to verify. Then you'll see it working adding each of those files there. You can see here I get the results. 
Now decompressing you don't need Terminal or anything special. Just double click and Archive Utility will handle passwords just fine even though you can't create the files with passwords you can unzip them. So I'll enter the password and then Return and it's going to create a folder with that same name and under it I can see those files. I can see that folder and the files that were in that folder. To make it a lot easier I really recommend creating a folder to contain everything that you want to zip up and then just having one thing that you can add here instead of having to type multiple names. 
So there's how to zip files, unzip files, and even create a password protected zip file on your Mac. Hope you found this useful. Thanks for watching. 

Comments: 3 Comments

    Douglas Brace
    3 years ago

    Are these types of password protected ZIP files compatible with Windows or only Macs?

    3 years ago

    Douglas: ZIP files are not platform-specific.

    Douglas Brace
    3 years ago

    Thank you, Gary. The reason I asked is because there have been times that I created password-protected ZIP files on either Mac or Windows and I ran into a problem on the other platform trying to extracting the contents.

Comments are closed for this post.