Brotli vs Gzip Compression

by | Last Updated Jan 6, 2022 | Performance and Optimisation | 0 comments

An excellent way to shrink your page sizes and speed up your WordPress site is to compress your files. Since the 90s, Gzip has been the golden standard for web file compression.

But Gzip is not the only compression method in use now. We have Brotli, a newer compression method from Google. Google released in Brotli in late 2013 and is picking up steam.

When it comes to Gzip vs. Brotli compression for your WordPress website, which compression should you be applying?
What does that comparison even mean? Or is either compression method excellent? Let’s find out!

Along with comparing both methods, we also show you how to use both Gzip and Brotli compression on your WordPress site.

Brotli vs. Gzip Compression: The Differences

Both Gzip and Brotli are techniques to compress your website’s files. Brotli and Gzip are similar for their core purpose.

Of course, the difference is how they both go about compressing your site and how efficient they are.

Let us cover the basics of Brotli and Gzip first. Then we can compare performance benchmarks.

Robust Global CDN with 74+ PoPs

Tier 1 Network Partners. < 30ms Global Latency.

Get access to our vibrant CDN for FREE and have a blazing fast website next to your customers; wherever they live.
In India, we have PoPs in Bangalore, Chennai, Mumbai, and New Delhi.

Gzip Compression

Gzip was released on 31 October 1992. Jean-Loup Gailly and Mark Adler created the program and intended for use by GNU. Thus the name GNUzip or Gzip is short.

Since the 90s, Gzip has been the predominant format for web compression. Even today, it retains that position.

DEFLATE algorithm is the base of Gzip compression.

Gzip has different compressions, though we refer to it as a single compression tool.

There are nine quality levels that balance compression level vs. speed in Gzip. Level 1 has small file savings but the fastest compression speed. Level 9 gives maximum file size reductions, but it is a relatively slow compression speed.

All major browsers support Gzip. And most web hosting providers, including Rovity, support Gzip out of the box. However, we favor Brotli over Gzip due to its performance gain. More on that below.

Brotli Compression

Brotli is much younger than Gzip. Software engineers from Google released Brotli on 15 October 2013. Until 2015 it didn’t focus on HTTP compression.

Can I Use Brotli

It took some time for adoption. All major web browsers supported Brotli in 2022.

Brotli also has different compression levels similar to Gzip. Brotli has eleven various levels that follow a similar pattern as Gzip.

Level 1 has small file savings but the fastest compression speed. Level 11 gives maximum file size reductions, but it is a relatively slow compression speed.

Brotli vs. Gzip Benchmarks: Who Performs Better?

All good, let us ask the big question. Brotli vs. Gzip compression – which produces better?

Here, let us see some public benchmark tests. Before we drill down to the data, knowing multiple parts of web performance and compression is essential.

Compression Ratio – this is how significant the file size savings are. A two MB file compressed to one MB is an example.

Compression Speed is how fast it takes to compress and decompress the file. Compression Speed is vital for dynamic content that you require to compress on the fly.

Let Us Take a Look at the Data

Let us take a look at the content-delivery giant Akamai’s benchmark. Akamai listed the top 1,000 URLs. Then downloaded the HTML, CSS, and JavaScript files from the URLs.

Akamai compressed those files with both Gzip and Brotli methods. Here are their benchmark results.

Brotli vs Gzip – HTML

  • Median Gzip Savings 78% 78%
  • Median Brotli Savings 82% 82%

Median Brotli Improvement Over Gzip is 21%

Brotli vs Gzip – JavaScript

  • Median Gzip Savings 63% 63%
  • Median Brotli Savings 68% 68%

Median Brotli Improvement Over Gzip is 14%

Brotli vs Gzip – CSS

  • Median Gzip Savings 79% 79%
  • Median Brotli Savings 82% 82%

Median Brotli Improvement Over Gzip is 17%

But the better result of compression is more than just smaller file sizes.

It is also vital to how long it takes to finish the compression (Compression Speed). Akamai found that compression speed matters when the compression level we use.

At some levels, Gzip was faster.
At some levels, Brotli delivered faster results.

If you can tweak the Brotli settings a little bit, the compression speeds can surpass Gzip rates. At the same time, Brotli provides some significant compression. Akamai concludes their report.

OpenCPU also ran its benchmarks. In terms of the compression ratio, Brotli was superior. At on-the-fly compression, Gzip was much faster. However, it is unclear how much they tweaked Gzip settings.

Hotel brand OYO improved its latency by 37%.

Does the Difference Matter?

The research data is specific that Brotli offers a better compression ratio than Gzip. Brotli compresses our website more than Gzip.

However, remember that it is not just about the compression ratio.

It is also about how long it takes to compress and decompress data. There, the difference is not quite as pronounced.

Overall the data suggest that:

Because of the superior compression ratio, Brotli is better at compressing static data.
Gzip often has superior compression speed. It is better at compressing dynamic data.

If you work around the Brotli settings, you can get compression speeds competing with Gzip. You can also benefit from a better compression ratio.

Are you an ordinary WordPress user? If yes, I don’t think the Gzip vs. Brotli debate is something you need to worry about much. Thus you don’t need to invest your time heavily on thinking about both of them.

Yeah, it is essential to use some compression. But for an average WordPress website, you don’t need to stress whether you are using Brotli or Gzip.

On WordPress, Gzip compression is much easier to use. Because Gzip is almost universally used, it is a great place to start for most WordPress users. Gzip gets your site the benefits of compression effortlessly.

How to Compress Websites With Gzip?

Suppose you are hosted with Rovity or using CDN like Cloudflare. In that case, your site is already benefiting from Gzip compression.

Gzip also enables popular cache plugins like WP Rocket and LiteSpeed out of the box.

Rovity, Cloudflare, or WP Rocket – all of them activate the Gzip compression automatically. You don’t need to take any manual actions at all.

You don’t need to take any manual actions at all.

Suppose your host doesn’t offer Gzip compression by default. In that case, you can also activate Gzip compression by installing a WordPress Gzip compression plugin.

How to Enable Gzip Compression on WordPress?

Most WordPress performance and caching plugins include Gzip as part of their core feature.

So that means you don’t need to install any separate plugin to enable Gzip compression for your WordPress website.

How to Test Gzip Compression?

We have a simple way.

You can use Gzip / Brotli Compression Test tools from This tool will check Gzip/Brotli Compression and show you helpful information.

Check Gzip or Brotli Compression

How to Use Brotli Compression on WordPress?

Applying Brotli compression on your WordPress site is a little complicated. You need to pick a host that supports Brotli to enable Brotli compression at a server level.

Almost every single host supports Gzip out of the box. It is hard to find a WordPress host that supports Brotli on shared or managed plans.

If your website is hosted on Rovity’s NVMe SSD-powered premium servers, then you are good with Brotli. We have enabled Brotli and Gzip by default for your site. We prioritize Brotli over Gzip to help you get better performance.

Rovity Enabled Brotli Compression

Aren’t your sites hosted with Rovity? Ah, I feel that pain, and you don’t feel lost. Luckily, there is another option that works well for all websites.

Cloudflare Brotli Compression

You can enable Brotli compression with the click of a button if you use the Cloudflare CDN service.

To activate Brotli, go to the Speed Tab. And click on Optimisation.

Cloudflare Brotli Compression

You can toggle On or Off here. Again, if your website is hosted with Rovity, you may not need this setting to enable it.

See more Cloudflare settings to boost your website performance.

How to Test Brotli Compression?

Well, have you connected your WordPress site to Cloudflare and enabled Brotli compression?

See the easy way to test if Brotli is working. Head over to KeyCDN’s Brotli test tool. And analyze your domain here.

Verify Brotli Compression Support

Brotli vs. Gzip: Pick the One That’s Best for You

Both Gzip and Brotli help you compress your website’s files. Gzip is the older and more prominent of the two. Brotli is newer but picking up slowly.

Brotli seems to outperform Gzip in some benchmarks, primarily when working around its configuration. For most WordPress users, Gzip is a better starting point.

What is your preferred compression mode? Let me know in the comments below.

If you enjoyed this tutorial, then you’ll love Rovity, and our fast-growing premium shared hosting on the cloud. Check out our subscription plans.

Rovity Is the Fastest WordPress Host to Accelerate Your Site. Sign Up Now to See the Difference.

Come and experience the next generation of shared hosting on the cloud

By Jafar Muhammed

Jafar Muhammed has 10+ years of experience in WordPress, web hosting, domain names, DNS, CDN, server administration, etc. He is an open web advocate. He is the CEO of Rovity, the fastest growing premium shared hosting startup in India.

Check Out These Related Posts



Submit a Comment

Your email address will not be published. Required fields are marked *