Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to password protect a zip on my macbook pro?

I am using the default compressing feature on my Macbook frequently. And it works fine all the ways. However, I need to make a new zip archive and password protect the zip for security reason. Can I do this with the default compress option on my Mac?

MacBook Pro (2017 – 2020)

Posted on Oct 18, 2023 12:24 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 19, 2023 3:25 AM

Yes, you can absolutely create a password-protected zip archive using the Terminal option on your Mac or professional Compression tool. They can all add an extra layer of security to your files.


Method 1. Using "FossZIP"

FossZIP is a popular file compression and extraction utility for macOS. It's essentially a file archiver and manager, similar to WinZip or WinRAR on Windows, but designed specifically for Mac users.



  1. Install "FossZIP" from its official website.
  2. Select your files, right-click, and choose "Compress [X] Items."
  3. Open "FossZIP."
  4. Drag and drop the zip file into "FossZIP."
  5. In "FossZIP," set a password and choose encryption options.
  6. Click "Create" to generate the password-protected zip archive.

These third-party tools offer user-friendly interfaces for creating password-protected zip archives on your Mac.


Source: https://www.sysgeeker.com/blog/how-to-create-password-protected-zip-file-on-mac.html


Method 2. Zip a file on Mac using Terminal

Creating a zip file on macOS using the Terminal is straightforward. You can use the zip command to create a zip archive. Here's how to do it:


  1. Open Terminal: You can find the Terminal app in the Utilities folder within the Applications folder, or you can use Spotlight (Command + Space, then type "Terminal").


2. Navigate to the Folder: Use the cd command to navigate to the folder containing the files you want to zip.


3. Create the Zip File: To create a zip file, use the zip command followed by the name you want to give to the zip archive and the files you want to include.


For example, to zip a file named "example.txt," you can use the following command:

zip -er filename.zip


While using Terminal to create a zip file is a valid method, I understand that it may not be suitable for everyone, especially those who are not comfortable with command-line interfaces. So, the method 1 maybe a best solution.

16 replies
Sort By: 
Question marked as Top-ranking reply

Oct 19, 2023 3:25 AM in response to Rayokc379

Yes, you can absolutely create a password-protected zip archive using the Terminal option on your Mac or professional Compression tool. They can all add an extra layer of security to your files.


Method 1. Using "FossZIP"

FossZIP is a popular file compression and extraction utility for macOS. It's essentially a file archiver and manager, similar to WinZip or WinRAR on Windows, but designed specifically for Mac users.



  1. Install "FossZIP" from its official website.
  2. Select your files, right-click, and choose "Compress [X] Items."
  3. Open "FossZIP."
  4. Drag and drop the zip file into "FossZIP."
  5. In "FossZIP," set a password and choose encryption options.
  6. Click "Create" to generate the password-protected zip archive.

These third-party tools offer user-friendly interfaces for creating password-protected zip archives on your Mac.


Source: https://www.sysgeeker.com/blog/how-to-create-password-protected-zip-file-on-mac.html


Method 2. Zip a file on Mac using Terminal

Creating a zip file on macOS using the Terminal is straightforward. You can use the zip command to create a zip archive. Here's how to do it:


  1. Open Terminal: You can find the Terminal app in the Utilities folder within the Applications folder, or you can use Spotlight (Command + Space, then type "Terminal").


2. Navigate to the Folder: Use the cd command to navigate to the folder containing the files you want to zip.


3. Create the Zip File: To create a zip file, use the zip command followed by the name you want to give to the zip archive and the files you want to include.


For example, to zip a file named "example.txt," you can use the following command:

zip -er filename.zip


While using Terminal to create a zip file is a valid method, I understand that it may not be suitable for everyone, especially those who are not comfortable with command-line interfaces. So, the method 1 maybe a best solution.

Reply

Apr 10, 2024 6:55 PM in response to PeretrZriouly

All the terminal steps worked EXCEPT the password part.

A key icon shows up, and when I type nothing happens. If I hit enter it moves to the password verification prompt. Same thing, if I type no text shows up and hitting enter for a final time will let me know that password verification failed.

Reply

Dec 20, 2023 5:03 PM in response to applpal

Is this what you tried?


Encrypt a zip file in the Mac Terminal

  1. Open your Spotlight Search bar and search Terminal. ...
  2. Type zip -er desiredfilename. ...
  3. Drag and drop the folder, file or files you want to compress into a zip file into the Terminal window.
  4. Press the Enter key.
  5. Next you will be prompted to enter a password.


Reply

Oct 18, 2023 2:17 AM in response to Rayokc379

Rayokc379 wrote:

I am using the default compressing feature on my Macbook frequently. And it works fine all the ways. However, I need to make a new zip archive and password protect the zip for security reason. Can I do this with the default compress option on my Mac?


Yep, I totally get wanting to add a layer of security to your zip files. The default compress option on your MacBook won't let you password-protect directly, but fear not, your trusty Mac still has a way to do it. Just requires a little trip to the Terminal! Here's how:


Step 1. Open Terminal:

You can find it in the Applications > Utilities folder or just search for it using Spotlight.


Step 2. Navigate to the File's Location (optional step if the file isn't on your desktop):

Use the cd command followed by the directory path. For instance, if the file is in the Downloads folder, you'd type cd Downloads and hit Enter.


Step 4. Zip & Password Protect:

    1. Type zip -e [name-of-new-zip-file].zip [original-file-or-folder-name]
    2. For example: zip -e mysecurefile.zip mydoc.txt
    3. Press Enter, and Terminal will then ask you to set and verify your password.


Done!: You'll now have a password-protected zip archive in the same directory as your original file/folder.


Just a heads-up, don't forget that password because recovering it can be a real pain!

Hope that helps, and stay secure! 😊🔒

Reply

Dec 20, 2023 8:56 PM in response to BDAqua

Thank you BDAqua. This is much clearer.


But I would add one more guidance here since I have experienced so.


In step2. if u type that command elsewhere other than where ur files/ folders are then it was giving error to me.

First I had to change directory ( 'cd' ) ...like cd downloads if ur files to be dragged/ zipped are there.

Then I typed zip -er 'myZippedFileName.zip'

Then works cool.


Though I have not tried yet dragging files from multiple locations to zip at one place. Probably that won't work at all.

Reply

Oct 19, 2023 8:36 PM in response to WenDenly201

WenDenly201 wrote:

Yes, you can absolutely create a password-protected zip archive using the Terminal option on your Mac or professional Compression tool. They can all add an extra layer of security to your files.

Method 1. Using "FossZIP"
FossZIP is a popular file compression and extraction utility for macOS. It's essentially a file archiver and manager, similar to WinZip or WinRAR on Windows, but designed specifically for Mac users.


https://discussions.apple.com/content/attachment/8dd4317b-00ce-472e-9309-93baa28a61ec1.

Install "FossZIP" from its official website.
2. Select your files, right-click, and choose "Compress [X] Items."
3. Open "FossZIP."
4. Drag and drop the zip file into "FossZIP."
5. In "FossZIP," set a password and choose encryption options.
6. Click "Create" to generate the password-protected zip archive.
These third-party tools offer user-friendly interfaces for creating password-protected zip archives on your Mac.

Source: https://www.sysgeeker.com/blog/how-to-create-password-protected-zip-file-on-mac.html

Method 2. Zip a file on Mac using Terminal1.
Creating a zip file on macOS using the Terminal is straightforward. You can use the zip command to create a zip archive. Here's how to do it:

Open Terminal: You can find the Terminal app in the Utilities folder within the Applications folder, or you can use Spotlight (Command + Space, then type "Terminal").

2. Navigate to the Folder: Use the cd command to navigate to the folder containing the files you want to zip.

3. Create the Zip File: To create a zip file, use the zip command followed by the name you want to give to the zip archive and the files you want to include.

https://discussions.apple.com/content/attachment/216ad826-6896-47d9-9fd4-bb02fb44ec48

For example, to zip a file named "example.txt," you can use the following command:
zip -er filename.zip

While using Terminal to create a zip file is a valid method, I understand that it may not be suitable for everyone, especially those who are not comfortable with command-line interfaces. So, the method 1 maybe a best solution.

Tried the zip command in the Terminal app but can't open PC. Instead, Fosszip worked fine. Thank you

Reply

Oct 18, 2023 8:05 PM in response to PeretrZriouly

PeretrZriouly wrote:


Rayokc379 wrote:

I am using the default compressing feature on my Macbook frequently. And it works fine all the ways. However, I need to make a new zip archive and password protect the zip for security reason. Can I do this with the default compress option on my Mac?

Yep, I totally get wanting to add a layer of security to your zip files. The default compress option on your MacBook won't let you password-protect directly, but fear not, your trusty Mac still has a way to do it. Just requires a little trip to the Terminal! Here's how:

Step 1. Open Terminal:
You can find it in the Applications > Utilities folder or just search for it using Spotlight.

Step 2. Navigate to the File's Location (optional step if the file isn't on your desktop):
Use the cd command followed by the directory path. For instance, if the file is in the Downloads folder, you'd type cd Downloads and hit Enter.

Step 4. Zip & Password Protect1. :
Type zip -e [name-of-new-zip-file].zip [original-file-or-folder-name]
2. For example: zip -e mysecurefile.zip mydoc.txt
3. Press Enter, and Terminal will then ask you to set and verify your password.

Done!: You'll now have a password-protected zip archive in the same directory as your original file/folder.

Just a heads-up, don't forget that password because recovering it can be a real pain!
Hope that helps, and stay secure! 😊🔒

Thanks for the steps and I followed the instructions carefully. However, when I was trying to open this password protected on another PC, WinZip says the file is damaged and there is no way to open the file. Anythought?

Reply

Dec 19, 2023 10:34 PM in response to Rayokc379

What about zipping multiple files ( around 50 files or more ) from a single folder or different folders?

Do we need to type down all 50+ files name one by one with its extensions?


Why nobody or even MAC gives clear command examples with images for every cases??? ( max 5 scenarios it will be though ).

Reply

Apr 10, 2024 7:02 PM in response to acbyrd

acbyrd wrote:

All the terminal steps worked EXCEPT the password part.
A key icon shows up, and when I type nothing happens. If I hit enter it moves to the password verification prompt. Same thing, if I type no text shows up and hitting enter for a final time will let me know that password verification failed.


The two password prompts presented by zip are not echoed, and the input to each must match.


And though not mentioned above, zip security isn’t great:

https://security.stackexchange.com/questions/35818/are-password-protected-zip-files-secure#35842


It can be better to AES encrypt or (for signing) asymmetric encrypt the zip, if the filenames are sensitive or the integrity of the archive contents are an issue.


Reply

How to password protect a zip on my macbook pro?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.