Free ZIP test files and sample generator
Bundles multiple files into a single compressed archive. Useful for batch downloads and fixtures.
What is a .zip file?
ZIP: Compressed Archive. ZIP is the universal archive: every operating system opens it, and it underpins DOCX, XLSX, JAR, EPUB and APK. Archive handling is also a security-sensitive area, path traversal and decompression bombs both live here.
Why generate a test ZIP file?
- Test archive upload and extraction, including path-traversal defenses.
- Check nested folders and multi-file extraction.
- Exercise size limits before and after decompression.
- Exercise the password prompt with an encrypted archive.
What you can put inside a .zip file
You get 5 content options for ZIP, so the file holds something meaningful rather than random padding: Text files, Mixed file types, Nested folders, Many small files, Password protected (test1234). Pick several and they are merged into one file, with a section, sheet, slide or folder for each.
How a .zip file is identified
Every .zip file begins with 50 4B 03 04, the ASCII letters "PK", the initials of Phil Katz, who created the ZIP format. That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
The archive's own file list decides the size: entries are planned so the finished archive lands on the byte you asked for, rather than padding after the fact.
Negative testing with broken ZIP files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
50 4B 03 04identifying a .zip is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample ZIP content
[Archive], data.json, users.csv, report.pdf
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Open with your OS's built-in extractor, 7-Zip, or `unzip -l file.zip`. Choosing the "Password protected" content option encrypts every entry, and the password is test1234, published deliberately, because a fixture nobody can open is useless. That option uses ZipCrypto, the legacy PKWARE scheme, because every extractor in existence reads it; it is also cryptographically weak and trivially broken, which does not matter for generated filler but would matter a great deal if anyone mistook it for real protection. Note that entry names stay readable even when encrypted, ZIP encrypts contents, never the file list.
Media type application/zip · extension .zip · category Archives
Generate a .zip file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about ZIP files
What identifies a .zip file?
A .zip file begins with the bytes 50 4B 03 04, the ASCII letters "PK", the initials of Phil Katz, who created the ZIP format. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .zip file be an exact number of bytes?
The archive's own file list decides the size: entries are planned so the finished archive lands on the byte you asked for, rather than padding after the fact.
What can go inside the ZIP file?
There are 5 content options for .zip: Text files, Mixed file types, Nested folders, Many small files, Password protected (test1234). Choose more than one and they are combined into a single file, a section, sheet, slide or folder per option, rather than downloaded separately.
Can I download several broken ZIP files at once?
Yes, select more than one File Condition and you get one ZIP containing a .zip per condition, each named after its condition.
Can the ZIP file use UTF-16 or a byte-order mark?
No, and deliberately. A .zip file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
Can I password-protect the ZIP file?
Yes, choose the password-protected content option. The password is the published test value shown on the option itself, because a fixture nobody can open is useless. The file is genuinely encrypted, so a reader that supports encryption will ask for the password.
Why does Windows open my password-protected ZIP without asking?
Because the built-in Windows tools do not support ZIP encryption, and they fail quietly rather than telling you. File Explorer and PowerShell's Expand-Archive will "extract" the archive without prompting and write files that are still encrypted, each one 12 bytes longer than it should be. Use 7-Zip, WinRAR, or the tar that ships with Windows: tar -xf archive.zip --passphrase test1234. On macOS and Linux, unzip and Archive Utility handle it correctly.
How do I open or verify the ZIP file?
Open with your OS's built-in extractor, 7-Zip, or unzip -l file.zip. Choosing the "Password protected" content option encrypts every entry, and the password is test1234, published deliberately, because a fixture nobody can open is useless. That option uses ZipCrypto, the legacy PKWARE scheme, because every extractor in existence reads it; it is also cryptographically weak and trivially broken, which does not matter for generated filler but would matter a great deal if anyone mistook it for real protection. Note that entry names stay readable even when encrypted, ZIP encrypts contents, never the file list.