WebBeautify

Optimize

Gzip Size Calculator

Paste text on the left, hit Run, copy fewer comments, fewer wasted bytes, a honest gzip estimate. No Node, no pip, no Docker for a five-minute job. That is the gzip size calculator.

Input 0 B
Output —

Drop a file on the left. Drafts stay in this browser. Shortcut: Ctrl or Cmd + Enter to run.

How this gzip size calculator works

  1. Paste or drop a .txt file into the input on the left.
  2. Flip options if you see them (comments, indent, case). Defaults are the safe ones.
  3. Hit Run, or Ctrl / Cmd + Enter. Leave “Process on server” off unless you mean it.
  4. Read the status line, then copy, download, or jump to a related tool.

What this gzip size calculator is for

The file is already in front of you. You need to optimize it without opening a whole IDE profile. Paste, run, copy. Typical timing: you are arguing about weight, cleaning a dump, or preparing SVG for inline use.

You walk away with fewer comments, fewer wasted bytes, a honest gzip estimate.

What it will not pretend to be

This is not image compression or a full webpack pipeline. Treat this as a text transform. Encoding, hashing, and diffs do not “understand” your programming language.

By default nothing leaves the tab. Tick “Process on server” only if you want to compare results or use gzip numbers that match the server library.

A practical way to use it

Drop a .txt file onto the input or paste. Flip options if they are there. Run. Read the status line. Copy or download. Drafts stay on this device so a refresh does not punish you.

When you are done, hop a related tool instead of starting over: minify and beautify toss the file back and forth, format and validate often share a parser, convert wants valid input first.

The small print that saves a round-trip

Treat this as a text transform. Encoding, hashing, and diffs do not “understand” your programming language.

You searched “gzip size calculator online.” You got an editor, not a login wall. That is the deal.

Frequently asked questions

What does a gzip size calculator tell you?

A guess at how small the text becomes after gzip — not “how fast the page feels.” A 12 KB JS file might gzip to ~4 KB. The number is for arguments like “is this icon SVG cheaper than PNG?”

Is the estimate exact for my CDN?

No. Compression level, dictionary, Brotli vs gzip, and whether HTML is already minified all move the number. Treat it as a compass, not an invoice.

Fun fact?

Fun fact: repeating <div class="item"> compresses ridiculously well. Unique minified class hashes (._a3f2c1) compress worse. Design systems with shared class names are accidentally gzip-friendly.

Minify first or gzip first?

Minify the source, then gzip the result. Gzip of pretty HTML still wins; minify+gzip wins more because comments are not there to repeat.

Example of stacking?

Pretty CSS 24 KB → minified 18 KB → gzip ~6 KB. Someone quoting “we saved 6 KB by minifying” might have ignored that gzip already saved 15 KB. Measure both.

Does gzip help JSON APIs?

Yes, if the client sends Accept-Encoding: gzip and the server honors it. Pretty JSON gzips well too. Minified JSON is a bit smaller before gzip; after gzip the gap shrinks.

Brotli vs gzip?

Brotli often wins on text for HTTPS. Gzip is the older, wider default. A calculator labeled gzip is answering gzip. Do not convert the number into a Brotli SLA.

When is the number useless?

Images, already-compressed fonts, and video. Gzipping a JPEG can make it bigger. This tool is for code and text.