GZIP is the standard compression format for web servers, API responses, and Linux deployment pipelines. A valid GZIP file has specific requirements: the two-byte magic number (1f 8b), a compression method byte, and a trailing CRC32 checksum — none of which a renamed text file will have. Testing a decompression library, web server content-encoding middleware, or backup tool that consumes .gz files requires input that will actually decompress. Generate a genuinely valid GZIP stream here at any exact compressed-file size, entirely in your browser.
Download a Sample GZIP File (Any Size)
Generate and download a sample GZIP file at any exact size — free, in-browser, no signup.
1 MB (1,000,000 bytes)
Generated entirely in your browser — nothing is uploaded.
Common use cases for GZIP test files
- Testing GZIP decompression libraries and stream parsers
- Validating web server Content-Encoding headers and client decompression
- Checking backup and archival pipelines that consume .gz compressed files
- Stress-testing compressed data pipelines with a valid, reproducible input
Related formats
Sample File Generator — all 20 formats, any exact size, free in-browser download.
Frequently asked questions
Will gunzip and Python's gzip module decompress this file successfully?
Yes. The file is a valid GZIP stream with the correct magic bytes (0x1f 0x8b), compression method 8 (DEFLATE), and a correct CRC32 and size trailer. The standard gunzip command and Python's gzip.open() decompress it without errors.
Can I use this to test web server Content-Encoding gzip handling?
Yes. Serving this file with Content-Encoding: gzip and Content-Type: application/gzip lets you test whether clients correctly decompress the response and whether your server's content-encoding headers are accurate.
What is the uncompressed size relative to the compressed file?
The generator targets the compressed .gz file size on disk. The decompressed output will be larger — the ratio depends on the content, typically 2:1 to 5:1. If you need a specific uncompressed output size, generate a file roughly two to three times smaller than your target and measure the decompressed result.
Get weekly dev tools and tips