Gzip Size Calculator — Check Compressed Size & Ratio Online
Paste text or code to see its gzip (and raw) size instantly, plus the compression ratio and bytes saved. Uses the browser's native CompressionStream — great for estimating how small a JS/CSS/JSON asset will ship over the wire. 100% local.
Last updated:
CommentsPaste text, code, or JSON to see its raw and gzipped byte size instantly, plus the compression ratio and bytes saved. Uses the browser's native gzip — nothing is uploaded.
What is Gzip Size?
When a server sends a text asset — JavaScript, CSS, HTML, JSON, or SVG — it's almost always gzip- or Brotli-compressed first, so the number your users actually download is the compressed size, not the raw file size. This calculator compresses your input with the browser's native CompressionStream('gzip') API and reports raw bytes, gzipped bytes, the ratio, and how many bytes you saved. That makes it a quick way to set a performance budget, compare two implementations of the same component, or sanity-check why a 'small' JSON payload is still slow (highly repetitive text compresses far better than dense, high-entropy data). The result is a faithful gzip estimate at the default level; a CDN using Brotli will usually shave off another 10–20%.
How to check gzip size
- 1Paste the text, code, or JSON you want to measure.
- 2Read the raw size, gzipped size, ratio, and bytes saved.
- 3Compare alternatives by editing the input and watching the compressed number change.
Tips & Best Practices
- ▸Repetitive text (lots of repeated keys/whitespace) compresses dramatically better than random or already-compressed data.
- ▸Minify first, then gzip — minification and compression stack.
- ▸Brotli is typically 10–20% smaller than gzip; treat this as a reliable gzip ballpark, not a byte-exact Brotli figure.
Frequently Asked Questions
Why is gzip size what matters for web performance?
Servers and CDNs almost always serve text assets (JS, CSS, HTML, JSON, SVG) compressed with gzip or Brotli. The transfer size users actually download is the compressed size — not the raw file size — so gzip size is the number to optimize and budget against.
How is the gzip size computed in the browser?
It uses the native CompressionStream('gzip') API available in modern browsers, so the result matches what a gzip-enabled server would produce. No upload, no external service — everything runs locally.
Does this match Brotli / my CDN exactly?
It's a close, representative gzip estimate at the default compression level. CDNs may use a different gzip level or Brotli (which is usually 10–20% smaller), so treat this as a reliable ballpark for budgeting, not a byte-exact CDN replica.
Try Next
Meta Tag Preview
Preview how your page will appear in Google search results and social share cards on Facebook, Twitter/X, and LinkedIn. Parses <title>, meta description, canonical, and full Open Graph / Twitter Card tags with diagnostics. 100% local.
Related Tools
CIDR Calculator
Calculate IPv4 subnets from CIDR notation online. Get network address, broadcast, netmask, wildcard, usable host range, IP class, and binary representation. 100% local — nothing leaves your browser.
Color Converter
Convert colors between HEX, RGB, HSL, and HSV instantly with a live color preview and copy-ready CSS strings. Free, no signup, runs entirely in your browser.
User Agent Parser
Parse User-Agent strings to identify browser, engine, operating system, and device. Instantly see what your own browser sends.
HTTP Status Codes
Complete reference of HTTP status codes with meanings, use cases, and RFC citations. Search 60+ codes from 100 Continue to 511 Network Authentication Required.
cURL Converter
Convert cURL commands to Python (requests), JavaScript (fetch), Node.js, Go (net/http), PHP, or Java (HttpClient). Parses -H, -d, --data-urlencode, -F, -u, --json and more. 100% local.
URL Parser
Parse any URL into scheme, host, port, path, and query parameters — or build a URL from scratch with a form. Great for debugging redirect chains, tracking pixels, and OAuth flows. 100% local.