Developer Tools
Gzip Compression Size Estimator
Measure the gzip, deflate, and raw deflate compressed size of text or any file in your browser. Compare against HTTP performance budgets.
Gzip compression size estimator
Characters: 0 . UTF-8 bytes: 0Max input: 5,000,000 characters
Compressed sizes
Original input: 0 B
| Format | Compressed | Saved | Ratio |
|---|---|---|---|
Gzip RFC 1952. Sent over HTTP as Content-Encoding: gzip. | -- | -- | -- |
Deflate (zlib) RFC 1950 zlib stream. Used by HTTP Content-Encoding: deflate. | -- | -- | -- |
Raw deflate RFC 1951 raw deflate. No zlib header or footer. | -- | -- | -- |
Paste text or drop a file to measure gzip, deflate, and raw deflate sizes.
HTTP transfer budgets (gzip compressed)
Compares the gzip result to common web performance budgets. Helpful when shipping HTML, CSS, or JavaScript over the network.
14 KB
No inputFirst TCP congestion window. Critical HTML in this budget arrives in one round trip.
100 KB
No inputCommon Largest Contentful Paint hint for above-the-fold HTML and critical CSS.
170 KB
No inputChrome DevTools warning threshold for a single compressed JavaScript file.
1 MB
No inputGeneral page weight warning. Above this, mobile networks struggle.
What this measures
Original size
Byte length of the UTF-8 encoding, or the file size in bytes. Matches the Content-Length of an uncompressed HTTP response.
Compressed size
Bytes after the browser runs the input through a streaming CompressionStream at the default quality setting.
Saved
The number of bytes the format removed, and the matching percentage. Higher is better, but very small inputs can compress worse because of header overhead.
Ratio
Compressed bytes divided by original bytes. A ratio of 30% means the compressed output is 30% of the original transfer size.
Compression runs entirely in your browser using the native CompressionStream API. The text or file you provide never leaves your device.
How to use
- Pick a mode: Paste text to measure a JSON, HTML, CSS, or JavaScript snippet, or Choose file to drop a real artifact from your bundle.
- Paste the content into the text box, or drag a file onto the drop zone (the file stays in your browser).
- Read the results table. Each row shows compressed bytes, the bytes saved versus the original, and the ratio bar.
- Use Load sample to try a small JSON payload, or Clear to reset.
- Scroll to the budget panel to see how the gzip result compares to the 14 KB, 100 KB, 170 KB, and 1 MB HTTP transfer budgets.
- Click Copy summary to drop a plain-text report into a ticket, code review, or doc.
About this tool
Gzip Compression Size Estimator measures the on-the-wire transfer size of any text or file after the browser compresses it with gzip, deflate (zlib), and raw deflate. Pick a tab to paste text or drop a file, and the tool reports the original byte length, the compressed byte length, the savings in bytes, the savings as a percentage, and the compression ratio for all three HTTP-relevant formats in one table. A separate budget panel compares the gzip result against four well-known web performance thresholds: 14 KB for the first TCP congestion window (critical HTML in this budget arrives in one round trip), 100 KB for above-the-fold HTML and critical CSS guidance tied to Largest Contentful Paint, 170 KB for Chrome DevTools' yellow warning on a single compressed JavaScript bundle, and 1 MB for general page weight. Each budget shows a coloured bar so it is obvious at a glance whether the payload is within budget, with the exact headroom or overage printed in bytes. The math: original bytes are counted as the UTF-8 encoding of pasted text or the on-disk byte count of a dropped file, and compressed bytes are produced by piping the input through the browser-native CompressionStream API at the default quality setting. CompressionStream ships in Chrome 80 and later, Firefox 113 and later, and Safari 16.4 and later, so the page works on every current modern browser without loading any zlib JavaScript port. Compression is streaming, so a 25 MB file finishes in a few seconds without blocking the UI. Useful for front-end developers asking will my minified bundle fit Chrome's 170 KB hint, will this HTML survive the 14 KB first-packet budget, how much smaller is this JSON over the wire, or whether gzip beats raw deflate for a tiny payload where the gzip header overhead can erase the savings. Useful for SREs and performance engineers shipping API responses, for technical writers comparing markdown payload sizes, and for anyone curious how much weight content-encoding actually removes. Everything runs locally; the text or file you measure never leaves your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
JSON Minifier
Compact JSON with live byte savings and a JS literal copy.
Open tool
DeveloperHTML Minifier
Compress HTML safely: collapse whitespace, strip comments, drop attribute quotes, shrink boolean attributes.
Open tool
DeveloperCSS Minifier
Compress CSS with comment, whitespace, hex, and zero-unit optimizations and a live byte-savings readout.
Open tool
DeveloperJS Minifier
Safe JavaScript minifier with comment, whitespace, and punctuation controls.
Open tool
DeveloperSVG Optimizer
Clean and minify SVG markup with editor-metadata removal, number rounding, and default-attribute stripping.
Open tool
ImageImage Compressor
Compress JPG, PNG, and WebP locally with quality and resize controls.
Open tool