⚡ Developer · Client-side · No data sent to server

Nginx Gzip Configuration Generator

Build a ready-to-paste Nginx gzip block. Choose the compression level, minimum size, and which MIME types to compress, then drop the result into your http or server block.

Settings

Compression level (1 fastest, 9 smallest)
6
Levels 5 to 6 are the usual sweet spot. Above 6 the extra CPU rarely pays off for live traffic.
Minimum response size to compress (bytes) Tiny responses are not worth compressing. 256 to 1024 is typical.

MIME types

Options

nginx.conf
 Copied 
Where this goes. Place the block inside your http block (or a server block) and reload Nginx with nginx -t && systemctl reload nginx. For Brotli, you would need the separate ngx_brotli module; this tool covers the built-in gzip. Rules are built in your browser.