Forum Discussion

Sirko's avatar
Sirko
Iron Contributor
Jul 29, 2025

Re: How to encrypt a file on mac for password protection?

If you prefer a simple password-protected ZIP file,  you can encrypt a file on mac using Archive Utility (ZIP with Password.) Here is how to do it:

1. Select the file(s) or folder you want to encrypt.

2. Right-click and choose Compress [filename] (or use File > Compress in Finder).

3. Open Terminal (Applications > Utilities > Terminal).

4. Run the following command to password protect a file on mac:

zip -er encrypted.zip /path/to/files_to_encrypt

-e enables encryption.

-r includes subdirectories (if applicable).

5. Enter and verify a password when prompted.

6. The encrypted ZIP file (encrypted.zip) will be created in the current directory.

⚠️ Note: ZIP encryption is weaker than AES-256 (used by Disk Utility). Use this for convenience, not high-security needs.

No RepliesBe the first to reply

Resources