Archives

How to Add a Password to a ZIP File

Create a password-protected ZIP archive to secure files before sharing via email or cloud storage.

Difficulty
Beginner
Time
5 min

Last updated

A password-protected ZIP file keeps your files private when emailing to a client, uploading to cloud storage, or sharing sensitive documents. Neither Windows nor macOS built-in tools support creating password-protected ZIP files — you need a free tool.

  1. Download and install 7-Zip (7-zip.org — free, open-source)
  2. Select your files in File Explorer → Right-click → 7-Zip → Add to archive
  3. In the "Add to Archive" dialog:
    • Archive format: zip (or 7z for better compression + stronger encryption)
    • Encryption: Enter a password in the "Enter password" field
    • For ZIP: Encryption method is ZipCrypto (weak) or AES-256 (strong — requires 7-Zip to open)
    • For 7Z: AES-256 encryption is used automatically — the strongest option
  4. Click OK

Recommendation: Use 7Z format with AES-256 for the strongest encryption. ZIP's ZipCrypto encryption is weak and can be cracked with offline tools.

Method 2: Keka (macOS — Free)

  1. Download Keka from keka.io (free in direct download, paid in App Store)
  2. Open Keka → select ZIP format
  3. Enable "Password" → enter your password
  4. Drag files onto the Keka window → it creates a password-protected ZIP

Method 3: Terminal on macOS/Linux

zip -e archive.zip file1.pdf file2.docx

You will be prompted to enter and confirm a password.

Note: The built-in macOS zip uses ZipCrypto which is weak. For sensitive data, use 7Z with AES-256.

Method 4: WinRAR (Windows)

  1. Select files → Right-click → Add to archive
  2. Choose ZIP format → click Set password
  3. Enter and confirm password → check "Encrypt file names" for extra security
  4. Click OK → WinRAR creates the encrypted archive

Important Security Notes

  • ZIP + AES-256: Strong encryption; requires 7-Zip or WinZip to open (Windows built-in cannot open AES-256 ZIPs)
  • ZIP + ZipCrypto: Weak — crackable with brute-force tools; do not use for sensitive files
  • Always share the password separately from the ZIP file — sending both in the same email defeats the purpose
  • 7Z + AES-256 is stronger than ZIP for the same security level

Advertisement