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.
Method 1: 7-Zip (Windows — Free, Recommended)
- Download and install 7-Zip (7-zip.org — free, open-source)
- Select your files in File Explorer → Right-click → 7-Zip → Add to archive
- 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
- 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)
- Download Keka from keka.io (free in direct download, paid in App Store)
- Open Keka → select ZIP format
- Enable "Password" → enter your password
- 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)
- Select files → Right-click → Add to archive
- Choose ZIP format → click Set password
- Enter and confirm password → check "Encrypt file names" for extra security
- 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
Learn more
- How to Open a RAR File on Windows, macOS, and Linux
RAR files don't open natively on Windows or macOS. This guide shows the fastest way to extract RAR archives on every operating system — free.
- Why ZIP Files Get Corrupted and How to Fix Them
ZIP files fail to open for a small number of predictable reasons. Understanding which one applies to you tells you exactly whether and how the file can be recovered.