Free 7Z test files and sample generator

The 7-Zip archive format, popular for large cross-platform bundles. Generate valid .7z sample files to test extractors, archive scanners and upload handling.

Generate a .7z file →

What is a .7z file?

7Z: 7-Zip Archive. 7z is 7-Zip's own archive format, known for high compression ratios and for handling large bundles. The container is separate from the compression method: an archive records which coder each stream uses, so a 7z file can be LZMA-compressed or simply stored. Its header sits at the end of the file and is located by an explicit offset.

Why generate a test 7Z file?

How a .7z file is identified

Every .7z file begins with 37 7A BC AF 27 1C, "7z" followed by a fixed byte pattern. That is what a validator inspecting content rather than the file name looks for.

Negative testing with broken 7Z files

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 7Z content

[7Z], signature header + stored (Copy coder) stream + header (PackInfo, UnPackInfo, FilesInfo).

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 7-Zip, or list with `7z l file.7z`. On Windows `tar -tvf file.7z` also works, since the built-in tar is libarchive.

Media type application/x-7z-compressed · extension .7z · category Archives

Generate a .7z file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about 7Z files

What identifies a .7z file?

A .7z file begins with the bytes 37 7A BC AF 27 1C, "7z" followed by a fixed byte pattern. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.

Can I download several broken 7Z files at once?

Yes, select more than one File Condition and you get one ZIP containing a .7z per condition, each named after its condition.

Can the 7Z file use UTF-16 or a byte-order mark?

No, and deliberately. A .7z 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.

How do I open or verify the 7Z file?

Open with 7-Zip, or list with 7z l file.7z. On Windows tar -tvf file.7z also works, since the built-in tar is libarchive.

Related Archives formats

ZIP · TAR · GZ · RAR · JAR · WAR · ISO

Browse all file formats →