Create ZIP ZIP is a file compression and archiving format that reduces file sizes for efficient storage and transmission. It allows multiple files and directories combined into a single archive, typically with a '.zip' extension. ZIP archives are commonly used for data backup, software distribution, and file sharing. While this format is helpful for everyday digital tasks, managing many ZIP files or manually compressing archives can quickly become cumbersome and prone to human error. To streamline this process, we can use IronZip to create an archive with just a few lines of code, improving efficiency and automating these tedious tasks. Creating ZIP File with C# using IronZip; using (var archive = new IronZipArchive()) archive.Add("./assets/image1.jpg"); archive.Add("./assets/example.pdf"); archive.SaveAs("output.zip"); IronZip We first import the namespace IronZip to use the library. Afterward, we create a new ZIP archive utilizing the IronZipArchive constructor with the using statement, which creates an empty ZIP archive. Adding Files to the Empty Archive Before we save it, we can add some files to it with the Add method by providing the file's absolute path. You can add single or multiple files to the archive, and the files you can add range from images, as shown above, to documents, such as docx and PDF, to audio files, such as MP3, WAV, and even ZIP archives, to create a compressed archive within an archive. For more information regarding the list of compatible files that you can add, please refer to the documentation here. Saving and Exporting We finally save the archive and export it using the SaveAs method, saving it as output.zip. Learn to Read and Extract ZIP Files in C# Related Docs Links View on Github Related Tutorial Related How-To Guide Class Documentation Download IronZIP DLL Report an Issue on this page Ready to Get Started? Nuget Downloads 15,857 | Version: 2025.11 just released Free NuGet Download Total downloads: 15,857 View Licenses