How to zip a file with password: Step-by-step for Windows and Mac
How to zip a file with password: Step-by-step for Windows and Mac

Key takeaways

  • Windows 11's built-in compression does not support password protection; use third-party tools like 7-Zip or WinRAR
  • Always select AES-256 encryption over the weaker ZipCrypto standard
  • Use passwords with at least 12 characters, combining letters, numbers, and symbols
  • Communicate passwords through separate secure channels from the file itself
  • Keep archiving software updated to avoid security vulnerabilities
  • File metadata, like names and sizes, remains visible even with encryption

Learning how to zip a file with password protection is essential for secure file sharing. We rely on passwords to protect our phones, computers, and online presence, but did you know you can also password-protect zip files? This solution works perfectly for those needing secure encryption while handling larger or multiple files. With data breach costs reaching $4.88 million on average in 2024, protecting sensitive files before sharing has never been more critical.

In this article, we cover how to password-protect a zip file on Windows 11 and macOS, which encryption methods to use, and when to consider alternatives.

What is a zip file?

A zip file is a compressed archive format that packages one or more files or folders into a single container. The ZIP format uses lossless data compression algorithms to reduce file size while preserving original data integrity, meaning files return to their exact original state when extracted. 

Developed in 1989 by Phil Katz, the format is natively supported by Windows, macOS, and Linux operating systems. Popular third-party tools for creating and managing zip files include 7-Zip and WinRAR.

When should you use a password-protected zip file?

Compressing a folder into a password-protected zip file using AES-256 encryption provides security when sharing sensitive files via email. However, password-protected zip files face limitations that may require evaluation of alternative methods depending on organizational needs.

Zip files also act as archives for old information you want to keep consolidated. Because they compress contents into one file, handling becomes easier and transfers are faster. If bandwidth is a concern, a zip file uses far fewer resources than an uncompressed folder.

When using password-protected zip files for file transfer, follow these best practices:

  • Use AES-256 encryption (not the weaker ZipCrypto standard)
  • Employ strong passwords of at least 12 characters
  • Communicate the password through a separate secure channel
  • Keep your archiving software updated to versions like 7-Zip 25.01 or later
  • Be aware that file metadata, such as names and sizes, may remain visible

The FBI's 2024 report documented $16.6 billion in cybercrime losses, a 33% increase from 2023, with Business Email Compromise accounting for $2.77 billion. For professionals who regularly share sensitive documents via email, password-protecting files adds an essential security layer.

How to password-protect a zip file on Windows 11

Windows 11's built-in compression tool does not support password protection or encryption. You need third-party software to create password-protected zip files on Windows 10 or Windows 11.

How to add password to zip file using 7-Zip

7-Zip offers AES-256 password-protected encryption as an alternative to standard ZIP file formats. While 7-Zip supports strong encryption (referenced in NIST FIPS 197), password-protected archives face documented limitations: security software cannot scan encrypted contents, and file metadata remains exposed.

Important security note: Multiple critical vulnerabilities were discovered in 7-Zip during 2024 and 2025 that were actively exploited by attackers. Ensure you're running version 25.01 or later.

Here's how to password-protect a 7-Zip file:

  1. Download and install 7-Zip version 25.01 or later from the official website (https://www.7-zip.org/).
  2. Select all files and folders you want to compress and password-protect.
  3. Right-click and hover over 7-Zip from the menu.
  4. Select "Add to Archive" to open the "Encryption" menu.
  5. Type your password in the "Password" and "Re-Enter Password" fields.
  6. Critical: Select AES-256 as the encryption method (not ZipCrypto). ZipCrypto is cryptographically weak and unsuitable for protecting business data.
  7. Click "OK" to password-protect the file.
  8. Communicate the password through a separate secure channel (phone, encrypted messaging).

Using WinRAR

WinRAR is another alternative to standard zip processes. WinRAR supports AES-256 encryption in the RAR5 format, providing comparable security to 7-Zip. However, 7-Zip remains the preferred free option for most users. Ensure you run WinRAR version 7.13 or later to address critical security vulnerabilities.

Important security note: WinRAR experienced a zero-day vulnerability actively exploited by multiple threat actors before being patched.

Here's how to password-protect a ZIP file:

  1. Start WinRAR and click "Open."
  2. Select the zip file you'd like to password-protect.
  3. Click "Tools" from the menu bar.
  4. Select "Convert Archives" from the list.
  5. Select "Compression" from the new menu, then click "Set Password."
  6. Enter your password in the "Enter Password" and "Re-enter Password" fields.
  7. Click "OK" and then "Yes."

Encrypting a zip file with EFS

For storing information in a zip file more securely, you can use an encrypting file system (EFS) with AES-256 encryption. However, modern security experts increasingly recommend alternatives to password-protected zip files due to metadata leakage and the inability of security software to scan encrypted contents.

If you use EFS encryption, the key must be securely stored and backed up, as losing it makes files permanently inaccessible. For most business professionals, modern secure file sharing platforms with end-to-end encryption provide stronger security and better usability.

How to zip a file with password on Mac

Current macOS versions do not provide a native graphical interface method to password-protect zip files via Finder. You need Terminal or a third-party application. Apple's documentation notes that built-in zip encryption uses ZipCrypto, which is weak and vulnerable to password cracking.

For sensitive business data, Apple recommends FileVault for full disk encryption or encrypted disk images via Disk Utility.

Using Terminal on macOS

Here's how to create a password-protected zip file using Terminal:

  1. Open Terminal (Applications > Utilities > Terminal).
  2. Navigate to the folder containing your files using the cd command.
  3. Enter the zip command with the encryption flag (-e) and recursive flag (-r) for your files.
  4. Press Enter, and you'll be prompted to enter a password.
  5. Re-enter the password to confirm.
  6. Your encrypted zip file will be created in the current directory.

Important security note: The macOS built-in zip encryption uses ZipCrypto, which is cryptographically weak. For business files, use third-party tools with AES-256 encryption instead.

Using third-party tools on macOS

For stronger encryption on macOS, use third-party tools that support AES-256 encryption. Alternatively, prioritize platform-native encryption methods such as FileVault or encrypted disk images via Disk Utility, which provide significantly stronger security than password-protected zip files.

  1. Download and install a compatible archiving tool that supports AES-256 encryption.
  2. Right-click the file(s) or folder(s) you want to compress.
  3. Select the archive creation option.
  4. Enter your password and confirm it in the encryption section.
  5. Select AES-256 as your encryption method (not ZipCrypto).
  6. Click 'OK' to create your encrypted archive.

Understanding encryption methods: AES-256 vs ZipCrypto

Not all zip file encryption is created equal. Understanding the difference is essential for handling sensitive information.

  • ZipCrypto (legacy encryption): ZipCrypto is the older encryption standard built into native operating system tools. It uses a weak algorithm vulnerable to known-plaintext attacks, allowing security researchers to crack ZipCrypto passwords in hours using freely available software. Never use ZipCrypto for sensitive business files.
  • AES-256 (recommended): NIST FIPS 197 establishes AES-256 as the U.S. government-approved encryption standard providing strong cryptographic security resistant to all known practical attacks. It is approved for protecting classified information up to SECRET level when properly implemented.

Bottom line: Always select AES-256 encryption when creating password-protected zip files. Remember that even with strong encryption, password-protected zip files should be paired with secure sharing practices, such as communicating passwords through separate channels.

Zip file security vulnerabilities and limitations

While password-protected zip files provide security, experts and organizations are increasingly moving toward modern alternatives. Password-protected ZIP files face significant limitations: the inability of security software to scan encrypted contents, metadata exposure, and active exploitation by malware distributors.

Metadata exposure

Standard ZIP file encryption protects only file contents, leaving sensitive metadata exposed. According to SANS analysis, here's what remains accessible without decryption:

  • Filenames: revealing document types, project names, or business activities
  • File sizes: indicating content importance or sensitivity
  • Timestamps: revealing business activity patterns
  • Directory structure: exposing organizational hierarchy

A password-protected archive containing files named "Q4_Financial_Results.xlsx" or "Merger_Agreement_Draft.pdf" reveals confidential business information before any decryption attempt.

Recommended mitigation: For business use cases requiring complete confidentiality, use 7-Zip's native 7z format instead of ZIP, which encrypts both file contents and metadata, including filenames. 7-Zip documentation confirms this feature ensures comprehensive privacy protection.

Offline attack vulnerability

ZIP file password attacks operate as offline attacks, meaning adversaries can extract password hashes and attempt unlimited password guesses without lockout mechanisms. ZipCrypto encryption is cryptographically broken and vulnerable to password recovery within hours, while AES-256 encryption provides substantially stronger resistance.

With adequate encryption and a strong password, ZIP file security can remain effective; with weak encryption or poor password practices, protection collapses rapidly.

No multi-factor authentication

Password-protected zip files support only single password protection, with no options for multi-factor authentication, access logging, or enterprise-grade access controls. For business professionals requiring team collaboration, centralized password management, or comprehensive audit trails, modern secure file-sharing platforms provide significantly better security and usability.

Security scanning limitations

Attackers actively exploit password-protected zip files to spread malware because encrypted contents cannot be scanned by security software, per threat analysis research. As a result, security-conscious organizations have begun restricting password-protected attachments.

Mobile and cross-platform considerations

iOS and Android workflows

Mobile operating systems have significant limitations in handling password-protected zip files. Neither iOS nor Android includes native support for creating encrypted archives. To set a password in a zip file on Android or open protected archives on mobile devices, you need dedicated third-party archiving apps. When selecting a mobile app, verify it supports AES-256 encryption rather than just ZipCrypto.

Cloud storage integration

When storing password-protected zip files in cloud storage platforms like Dropbox, OneDrive, or Google Drive, encrypted archives may have limited functionality compared to unencrypted files. Consider whether your cloud platform's built-in sharing permissions might serve your needs more effectively.

Batch processing and automation

For business professionals who need to encrypt multiple files regularly, 7-Zip supports command-line operations that enable workflow automation. This allows you to create scripts that automatically encrypt files on a schedule, significantly improving workflow efficiency for recurring encryption tasks.

Best practices for creating a secure zipfile password

With so many passwords to remember, it can be tempting to include personal information. However, personal information is easy for hackers to guess, making for a weak password. Using simple words and proper names also makes passwords easy to guess. That's why you're often asked to include numbers and special characters. Even then, you may still be susceptible to brute-force attacks.

With password-protected zip files specifically, brute-force attacks operate as offline attacks where adversaries extract password hashes and attempt unlimited guesses without lockout mechanisms.

NIST guidelines recommend that a strong password should:

  • Be at least 12 to 16 characters in length (length is the primary security factor)
  • Prioritize length over complexity; a 16-character passphrase is more secure than an 8-character password with special characters
  • Use a combination of numbers, special characters, and letters to increase entropy
  • Avoid dictionary words or predictable patterns
  • Be unique and not reused across accounts; use productivity apps with built-in password managers for secure generation and storage

Sharing passwords securely

Security best practices indicate you should never send the password in the same email as the zip file. Instead, communicate the password through a separate secure channel such as a phone call or encrypted messaging application. Send the file via email and the password through a different channel, and verify the transfer was received.

When to consider alternatives to password-protected zip files

Password-protected zip files aren't always the best solution. Here are scenarios where alternatives may serve you better:

  • For frequent file sharing within teams: Consider using secure cloud storage platforms with built-in encryption and access controls. These provide audit trails, permission management, and don't require manual password distribution.
  • For highly sensitive documents: Consider platform-native disk encryption solutions like BitLocker (Windows) or FileVault (macOS). These provide stronger protection and address fundamental limitations of zip file encryption, including metadata exposure.
  • For compliance requirements: If you work in regulated industries like healthcare or finance, consult with your IT security team about approved file encryption methods. Government-approved encryption standards like AES-256 (per NIST FIPS 197) are commonly used for compliance, though implementation details are critical to effectiveness.

Secure file sharing made simple with Superhuman Mail

Password-protected zip files offer basic security but come with significant drawbacks: metadata exposure, no scanning protection, and cumbersome password distribution. For productivity-focused professionals who handle sensitive information daily, there's a better way.

Superhuman Mail provides enterprise-grade security without the friction. With features like Read Statuses to confirm delivery, Shared Conversations for secure team collaboration, and AI-powered tools that help you streamline workflow, you can share files safely while maintaining the speed you need.

Try Superhuman Mail today and experience secure, efficient email that eliminates the need for password-protected workarounds.

FAQs

Can I password-protect a zip file?

Yes, you can password-protect a zip file using third-party tools like 7-Zip or WinRAR. Windows 11's built-in compression does not support password protection. Always use AES-256 encryption rather than the weaker ZipCrypto standard for sensitive files.

How to create a Zip lock file?

To create a password-locked zip file, use 7-Zip or WinRAR. In 7-Zip, right-click your files, select "Add to Archive," enter your password, and choose AES-256 encryption. This creates a secure archive that requires a password to access.

How can I make a file password-protected?

You can make files password-protected by compressing them into an encrypted zip archive using 7-Zip with AES-256 encryption. Alternatively, use platform-native solutions like BitLocker (Windows) or FileVault (macOS) for stronger protection.

Can you put a password on a Zip drive?

Yes, you can encrypt zip drives or create password-protected archives on removable storage. Use 7-Zip with AES-256 encryption to create protected archives. For full drive encryption, consider BitLocker (Windows) or FileVault (macOS) for comprehensive protection.

Can someone see file names inside a password-protected zip without the password?

Yes, in most cases. Standard ZIP encryption protects file contents but not metadata like file names, sizes, and timestamps. For complete protection, use 7-Zip's 7z format with the "Encrypt file names" option enabled.

What happens if I forget my zip file password?

If you forget a strong password on an AES-256-encrypted file, recovery is computationally infeasible with current technology, provided the password is sufficiently strong (12+ characters with mixed case, numbers, and symbols). Store passwords securely in a password manager.

Will my password-protected zip file work on all platforms?

Compatibility depends on the encryption method. AES-256 encrypted files require compatible software (7-Zip, WinRAR, or similar) on each platform. Standard password-protected files may open more readily but provide weaker security.

Is AES-256 encryption secure enough for business files?

Yes. AES-256 is the U.S. government standard for protecting classified information and is recommended by NIST for securing sensitive business data. Built-in compression tools on Windows 11 and macOS do not support AES-256; use third-party tools like 7-Zip.

Can password-protected zip files be used for HIPAA or GDPR compliance?

Password-protected zip files with AES-256 encryption are commonly used as part of compliance strategies, but encryption alone doesn't guarantee compliance. Consult with your compliance team about your organization's specific requirements for data handling and audit trails.

Reduce distractions and save 4+ hours every week with Superhuman!
Keyboard shortcuts, Undo send, AI triage, Reminders, Beautiful design
Get Superhuman for Email