Skip to content
Free website migration on every plan, done by our team.Learn more ›
Performance

Gzip vs Brotli compression for faster websites

How text compression makes pages smaller, the difference between Gzip and Brotli, how to check what your site uses and how to turn compression on.

Short answer: Gzip and Brotli compress HTML, CSS and JavaScript before sending them, often cutting their size by 70% or more. Brotli usually compresses text smaller than Gzip and is supported by modern browsers over HTTPS. Most good hosts enable one or both automatically.

What gets compressed

Text files: HTML, CSS, JavaScript, JSON and SVG. Images such as JPEG and WebP are already compressed, so compressing them again doesn't help.

Gzip vs Brotli

GzipBrotli
SupportUniversalAll modern browsers (over HTTPS)
SizeGoodUsually smaller for text
Server costLowLow at normal levels

How to check

Open your browser's developer tools, reload the page and look at the Content-Encoding header for your HTML: br means Brotli, gzip means Gzip.

Turning it on

  • On LiteSpeed and many cPanel servers, compression is on by default.
  • On Apache, mod_deflate (Gzip) can be enabled in .htaccess. See .htaccess basics.
  • Many CDNs add Brotli automatically. See what a CDN is.

Frequently asked questions

Does compression help on mobile?

Yes. Smaller files download faster on slower connections. See website speed in Africa.

Can compression break my site?

Very rarely. Check that pages and downloads still work after enabling it.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.