Gzip Size Calculator – Free Online Tool
Measure actual gzip and deflate compressed bytes, savings percentage, and compression ratio.
Measure Real Gzip Compressed Size
Paste text or load a local file to run actual gzip compression in your browser and count the resulting bytes. The result is measured output from the browser CompressionStream API, not a fixed percentage estimate.
Calculate Compression Savings and Ratio
Compare original bytes with gzip bytes, percentage saved, bytes removed, and the original-to-compressed ratio. Repetitive text, JSON, HTML, CSS, JavaScript, XML, and CSV commonly compress better than already compressed media.
Compare Gzip With Deflate
See gzip and deflate output side by side. Both use the DEFLATE algorithm, but gzip adds its own wrapper and checksum, so small payloads can show a noticeable wrapper difference.
Test Text, JSON, Code, or Local Files
Measure UTF-8 text directly or choose a local file up to 5 MiB. Download the exact gzip output for testing while remembering that production servers and CDNs may use different compression levels or Brotli.
Private Browser-Based Compression
Compression, byte counting, comparison, and .gz generation run on your device. Text, files, filenames, and compressed bytes are not uploaded or included in optional analytics.
Frequently Asked Questions
Everything you need to know about the Gzip Size Calculator.
How do I calculate gzip compressed size?
Compress the exact bytes with a gzip implementation and count the output bytes. This calculator performs real gzip compression in your browser.
Why can a very small string become larger after gzip?
Gzip adds headers, metadata, and a checksum. For tiny or non-repetitive inputs, that wrapper can exceed the bytes saved by compression.
Are gzip and deflate the same?
They commonly use the same DEFLATE compression algorithm, but gzip and zlib-style deflate use different wrappers and checksums, so their byte totals differ.
Does this match my server or CDN exactly?
Not always. Compression level, library version, dictionaries, headers, minimum-size thresholds, and Brotli settings can change production output. Use this as a repeatable browser measurement and verify critical production responses separately.
Should I gzip JPEG, PNG, ZIP, PDF, or video files?
Usually not. These formats are already compressed, so gzip often saves little or can increase size. Text formats such as HTML, CSS, JavaScript, JSON, XML, and CSV are better candidates.
Are my files uploaded?
No. File reading, gzip and deflate compression, size calculation, and download generation happen entirely in your browser.