What is a ZIP file?
A ZIP file stores each file as a local header plus its data (stored or deflated), followed by a central directory that lists every entry and an end record that points at it. Readers start from the end, so the central directory is what counts.
Extractors have to deal with UTF-8 names, Zip64 records, empty folders, names that differ only by case, and entries like ../outside.txt that try to escape the target folder (zip slip). Each is a switch here.
Anatomy of a ZIP file
PK\x03\x04Local file header, then the dataCRC-32Checksum of the uncompressed dataflag bit 11Marks the name as UTF-8PK\x01\x02Central directory entry for each filePK\x06\x06Zip64 end record, for large archivesPK\x05\x06End of central directory and the comment
What you can generate
- Up to 5,000 files in folders up to 12 deep
- Stored or deflated, text, mixed or incompressible content
- Unicode names with the UTF-8 flag, spaces and dots, case duplicates
- Empty folders, zero-byte files, 250+ character paths
- Zip64 records and an archive comment
- ZipCrypto password (test)
- Unsafe on purpose: ../ path traversal and absolute paths
- Broken on purpose: bad CRC, truncated central directory
How to make one
- Open the ZIP generator, or start from a preset above.
- Set the size and switch on the edge cases you need; the preview and size estimate follow every change.
- Generate, then download. The file is made in your browser, and the same preset and seed always give you the same file.
Questions
Its entries only contain a short text note, but a careless extractor would write them outside the target folder. That is what it tests; open it with care.
Traditional PKWARE encryption (ZipCrypto), which is weak by design but still common. AES-encrypted ZIPs are listed for later.
No. The archive uses Zip64 records for every entry even though it is small, which is valid and enough to test a reader's Zip64 path.