Smart Deals - promotions, discount codes and sales

Gzip Compression Calculator

Fast, accurate and free online kompresji gzip calculator tool running directly in your browser.

Secure (SSL)
Client-Side Processing
100% Free
Instructions
  • 1
    Enter data
    Enter content, paste text or load a file from disk.
  • 2
    Click the button
    The tool will immediately process your data in the browser.
  • 3
    Get the result
    Copy the finished text or save the file to your device.
function runTool() {
  return "Result ready in 0.1s";
}
244 characters

raw: H4sIAAAAAAAAA6WNvQ7CMAyE9zyF5blC4m/pzguwIgZDrKqSm1hxoCDUd8cB3oDN99357vCgSYVB6SmZYh9eAQD5zqliD2jjkG6KXYM34+KsBVyN0e/1Zrvbd1+gQqm9aMn4Q5UGc3TCWkYS7AATzyZcqze5unAlPHt2+QxMbEYDt5IjK1PlCHMu0eCaJy3uwswiK/jDxbCEN3l9xY/0AAAA

Rate this tool:

Related tools

Other tools you may find useful

Gzip Compression Calculator - Check Size Before and After

Gzip is a lossless compression algorithm used to transfer web resources (HTML, CSS, JS, JSON). The server compresses, the browser decompresses - the user doesn't see the difference, but the page loads faster. The tool shows how much your data will be compressed.

gzip compression calculator gzip compression rate gzip size web file compression

How Gzip compression works

Gzip uses the DEFLATE algorithm (LZ77 + Huffman encoding). LZ77: replaces repeated sequences with pointers to previous occurrences. Huffman: encodes symbols with shorter codes based on frequency. Result: Repeating patterns (common in HTML/CSS/JS) compress perfectly (60-90% reduction).

Compression levels (1-9)

Level 1 (fastest, lowest compression): approximate compression, lowest CPU. Level 6 (nginx/apache default): optimal balance of speed and compression. Level 9 (maximum): best compression, ~10-20% slower than level 6. For static resources: compress once to level 9 (pre-compression). For dynamic people: level 1-4.

Compression rate of various file types

HTML: 60-85% reduction (many repeated tags). CSS: 70-85%. JavaScript: 60-80%. JSON API response: 70-90% (keys and patterns are repeated). Fonts (WOFF2): 0-5% (already compressed). Images (JPEG, PNG, WebP): 0-5% (already compressed). Video: 0-2%.

Brotli vs Gzip vs Deflate

Brotli (Google, 2015): 15-25% better compression than Gzip for text. Support: all modern browsers (Chrome, Firefox, Edge, Safari). Servers: nginx (1.11.5+), Apache (mod_brotli). Gzip: common standard, older browsers. Deflate: old variant, still supported.

FAQ

How to enable Gzip compression in nginx?

gzip on; gzip_types text/plain text/css application/javascript application/json image/svg+xml text/xml; gzip_min_length 1000; gzip_comp_level 6; gzip_vary on;. Check: curl -I -H "Accept-Encoding: gzip" URL | grep Content-Encoding. Result: "Content-Encoding: gzip" = enabled.

How to enable Gzip in Apache/.htaccess?

AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json. Check: curl -H "Accept-Encoding: gzip" -I URL | grep Content-Encoding.

What is Transfer-Encoding: chunked and Content-Encoding: gzip?

Content-Encoding: gzip: content is Gzip compressed (decompress on receipt). Transfer-Encoding: chunked: content sent in chunks (streaming, without Content-Length). Both can be combined: chunked transfer + gzip compression. HTTPS already encrypts data - it is an additional layer for content compression.

What files should NOT be compressed with Gzip?

Already compressed: JPEG, PNG, WebP, AVIF, GIF, MP4, WebM, ZIP, PDF, WOFF2. Small files (<1KB): Gzip header overhead (18-20 bytes) is proportionately large. Effect: nginx gzip_min_length 1000 skips files <1KB.

How do I measure the performance impact of Gzip compression?

Chrome DevTools → Network: "Size" (compressed) vs "Content" (original) column. PageSpeed ​​Insights: "Enable text compression" – audit. Lighthouse: similar. WebPageTest: detailed entities per resource. Target: Text resources > 1KB should have Content-Encoding: gzip or br.

Related tools: JSON API formatter, YAML validator and Base64 converter.

Install Webp.pl Have the tools in your own pocket!