Password Protect ZIP
using IronZip;
using IronZip.Enum;

// Create empty ZIP with highest compression
using (var archive = new IronZipArchive(9))
{
    // Password protect the ZIP (Support AES128 & AES256)
    archive.Encrypt("P@ssw0rd", EncryptionMethods.Traditional);

    archive.Add("./assets/image1.jpg");
    archive.Add("./assets/image2.jpg");

    // Export the ZIP
    archive.SaveAs("output.zip");
}
NuGet Download
PM > Install-Package IronZip
Password Protect ZIP

Password Protect ZIP

Password-protecting a ZIP archive involves adding a password to the archive to secure its contents. This ensures that only individuals with the correct password can extract or access the files within the ZIP archive. This password acts as a form of encryption, preventing unauthorized access to the files stored in the archive. To extract files from a password-protected ZIP archive, users must enter the correct password.

Explore How to Create, Read, and Extract ZIP Files
View on GitHub

Ready to Get Started?

Nuget Downloads 24,698Version:2026.10just released