Gzip Size Calculator
Measure how many bytes a piece of text or code takes before and after gzip compression, and how much smaller it gets. The result updates as you type.
1 Paste or type your text
2 Your answer
Your answer shows here as you type.
How to use the Gzip Size Calculator
- Paste or type the text, code or file contents into the box.
- Read the original size and the gzip size in bytes.
- Use the size reduction to see how much gzip saves for this content.
Frequently asked questions
What is gzip compression?
Gzip is a file format that wraps DEFLATE compression, which replaces repeated byte sequences with short references. It is widely used to shrink HTML, CSS and JavaScript sent over the web.
How much does gzip shrink typical code?
Text and source code often shrink to around 20 to 30 percent of their original size, but the result depends on how repetitive the content is. Already compressed data such as JPEG images or ZIP files barely shrinks.
Why can the gzip size be larger than the original?
A gzip file has a fixed overhead of about 18 bytes for its header and checksum. Very short inputs have little repetition to exploit, so the compressed output can be bigger than the input.
Will this match the size my server sends?
Usually it is close but not exact. Servers may use a different compression level, and many also offer Brotli, which often produces smaller files.
Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.