Testing

Zstd: Browser Support, Algorithm, vs Brotli

Zstd works in Chrome 123+, Edge 123+, Firefox 126+, Opera 109+, and Safari 26+ on macOS and iOS. Learn Zstd browser support, the algorithm, and vs Brotli.

Author

Prince Dewani

May 2, 2026

Zstd is a lossless compression algorithm developed at Meta and standardized by the IETF as RFC 8878 for HTTP content encoding. It works in Chrome 123+, Edge 123+, Firefox 126+, Opera 109+, and Safari 26+ on macOS and iOS, while Internet Explorer, Opera Mobile, and Samsung Internet do not support it.

This guide covers what Zstd is, the browsers that support it, how the algorithm works, how it compares to Brotli, how to enable it, and the known issues.

What is Zstd?

Zstd, short for Zstandard, is a fast lossless compression algorithm that Yann Collet wrote at Meta and the IETF standardized as RFC 8878. It pairs LZ77 dictionary matching with two entropy coders, ships as the application/zstd MIME type and the .zst file extension, and powers HTTP content negotiation through the Accept-Encoding: zstd header.

Which browsers does Zstd support?

Zstd is supported in modern Chromium-based browsers and recent Firefox builds, with Safari joining on Safari 26 and Internet Explorer, Opera Mobile, and Samsung Internet still without support.

Loading browser compatibility data...

Zstd compatibility in Chrome

Chrome supports Zstd from Chrome 123 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 118 to 122 had Zstd code shipped but disabled by default behind the enable-zstd-content-encoding flag, and Chrome 4 to 117 did not support it. Chrome only advertises zstd in Accept-Encoding over HTTPS, so plain HTTP responses fall back to Gzip or Brotli.

Zstd compatibility in Edge

Microsoft Edge supports Zstd from Edge 123 on Windows, macOS, Linux, and Android because Edge tracks the Chromium 123 baseline. Edge 118 to 122 had Zstd disabled by default. The ZstdContentEncodingEnabled enterprise policy let admins gate Zstd from Edge 125 to 137, and that policy is obsolete from Edge 138 because Edge always supports zstd content encoding from that version on.

Zstd compatibility in Firefox

Firefox supports Zstd from Firefox 126 on Windows, macOS, Linux, and Android. Firefox 1 to 125 did not advertise zstd in the Accept-Encoding header. Firefox for Android picked up Zstd in Firefox for Android 126 on the same Gecko base, so older Android Firefox builds still fall back to Brotli or Gzip on every request.

Zstd compatibility in Safari

Safari supports Zstd starting on Safari 26 on macOS Tahoe with partial support, and Safari 26.3 on iOS and iPadOS adds full support. Safari 3.1 through 18.7 on macOS and Safari 3.2 through 18.7 on iOS do not advertise zstd in the Accept-Encoding header, so older iPhones, iPads, and Macs fall back to Brotli or Gzip.

Zstd compatibility in Opera

Opera supports Zstd from Opera 109 on Windows, macOS, and Linux because that release tracks Chromium 123. Opera 9 to 108 did not support it. Opera Mobile and Opera Mini do not support Zstd in any version, so mobile traffic on those browsers falls back to Gzip or Brotli on every request.

Zstd compatibility in Samsung Internet

Samsung Internet does not support Zstd through Samsung Internet 29 on Galaxy phones and tablets. Samsung Internet is a Chromium fork, but the zstd Accept-Encoding header is gated behind a runtime build flag on the Samsung branch that has not been turned on yet, so Galaxy users fall back to Brotli or Gzip on every HTTPS request.

Zstd compatibility in Android Browser

Chrome for Android, the modern default browser on Android phones, supports Zstd from Chrome for Android 123 onward. The legacy AOSP Android Browser on Android 4.4 KitKat and earlier does not support Zstd. On modern Android phones, use Chrome for Android 123+, Firefox for Android 126+, or Edge mobile to send the zstd Accept-Encoding header over HTTPS.

Zstd compatibility in Internet Explorer

Internet Explorer does not support Zstd in any version. IE 5.5 through IE 11 only accept gzip and deflate in the Accept-Encoding header. Microsoft has retired Internet Explorer, so production traffic from IE should fall back to Gzip or Brotli or be redirected to Edge for Zstd content negotiation.

Note

Note: Zstd quietly falls back to Gzip on Safari, iOS, Samsung Internet, and HTTP-only origins. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

How does Zstd compression work?

Zstd combines LZ77 dictionary matching with two entropy coders to deliver decompression speeds above 500 MB/s per core while still beating Gzip on size. The encoder runs in two stages, then exposes a wide compression-level dial that servers can tune for the workload. Three building blocks drive the savings:

  • LZ77 backreferences: Zstd scans the input for repeated byte sequences and replaces later copies with short pointers back to the first match in a sliding window of up to 128 MB at the highest levels.
  • Huff0 entropy coder: Zstd rewrites literal bytes with a bit-packed Huffman coder named Huff0 that swaps tables on the fly, so frequent symbols use fewer bits than rare ones.
  • Finite State Entropy (FSE): Zstd encodes match offsets and lengths with a fast asymmetric numeral systems (ANS) coder called FSE, which gets close to Huffman compression at twice the speed.
  • Trained dictionaries: For short, similar payloads such as JSON API responses, Zstd accepts a pre-trained dictionary that primes the LZ77 window and shrinks small messages by up to 5 to 10 times.

Zstd exposes 22 standard compression levels from 1 (fastest) to 22 (smallest output), plus a --fast=N range below level 1 for negative levels. Most servers run levels 3 to 6 on dynamic responses, level 19 on static assets compressed at build time, and the dictionary mode for batches of similarly shaped JSON or protobuf payloads.

What is the difference between Zstd and Brotli?

Zstd and Brotli are both modern HTTP compression formats that beat Gzip on size, but they trade off differently on speed, ratio, and browser reach. Brotli is the older, denser default for web text; Zstd is the newer, faster option that the largest browsers picked up.

DimensionZstdBrotli
SpecificationRFC 8878RFC 7932
OriginYann Collet at Meta, BSD or GPLv2 dual licenseJyrki Alakuijala and Zoltan Szabadka at Google, MIT license
Compression levels1 to 22 (22 levels), plus a --fast=N negative range0 to 11 (12 levels)
File size at top levelRoughly 10 to 15% smaller than Gzip; slightly larger than Brotli 11 on small web textRoughly 15 to 20% smaller than Gzip on JavaScript, HTML, and CSS
Decoding speedAbout 500 MB/s per core, roughly 2x Brotli on the same inputAbout 250 MB/s per core
Static dictionaryNone by default; supports user-trained dictionaries for short payloads120 KiB built-in dictionary of around 13,000 web-friendly substrings
Browser reachChrome 123+, Edge 123+, Firefox 126+, Opera 109+, Safari 26+. Not in IE, Samsung Internet, or Opera Mobile.Chrome 50+, Firefox 44+, Edge 15+, Safari 11+, Opera 38+, Samsung Internet 5+. Not in IE.
Best fitLarge dynamic responses, JSON APIs with trained dictionaries, fast-decode CPU-bound clientsStatic assets compressed at build time, smallest possible HTTPS payloads, broader browser reach
...

How do you enable Zstd on your server?

Zstd is on by default in Cloudflare, Fastly, and most major CDNs, but you may need to compile or wire it up yourself for Nginx, Apache, or a custom origin. Follow these steps to add Zstd to Nginx through the ngx_zstd module:

  • Install the Nginx Zstd module: Clone tokers/zstd-nginx-module from GitHub and rebuild Nginx with --add-dynamic-module=/path/to/zstd-nginx-module, or install the prebuilt nginx-module-zstd package on your distro.
  • Load the modules in nginx.conf: Add load_module modules/ngx_http_zstd_filter_module.so; and load_module modules/ngx_http_zstd_static_module.so; at the top of nginx.conf, above the events block.
  • Configure compression in a server block: Inside the server block, add zstd on;, zstd_comp_level 6;, and a zstd_types line listing MIME types such as text/css, application/javascript, application/json, text/html, and image/svg+xml.
  • Reload Nginx: Run sudo nginx -t to confirm the config parses, then sudo nginx -s reload so the new directives take effect without dropping live connections.
  • Confirm Zstd is active: From your terminal, run curl -I -H "Accept-Encoding: zstd" https://your-site.com/ and look for content-encoding: zstd in the response headers.

If the response still comes back as content-encoding: gzip, the Zstd module did not load or the request URL is on plain HTTP. Re-check the load_module lines and confirm the request used HTTPS.

What are the known issues with Zstd?

Zstd is the fastest mainstream HTTP compression format, but a few real edge cases still bite in production. The biggest hits are HTTPS-only behavior, narrow browser reach below the modern stable lines, and uneven origin-server defaults.

  • HTTPS-only in browsers: Chrome, Edge, Firefox, and Safari only advertise Accept-Encoding: zstd over HTTPS. Plain HTTP responses fall back to Gzip even when both client and server support Zstd.
  • Narrow Safari and iOS coverage: Safari 25 and earlier on macOS and iOS 18.7 and earlier do not support Zstd. iPhones and iPads on iOS 18 still fall back to Brotli, so Brotli has to stay in the negotiation chain for at least one more major iOS cycle.
  • Samsung Internet has not flipped the flag: Samsung Internet 29 still does not advertise zstd in Accept-Encoding, even though the underlying Chromium ships it. Galaxy traffic falls back to Brotli on every request.
  • Origin servers default to Gzip or Brotli: Nginx, Apache, IIS, and Tomcat ship Gzip on by default and require manual setup for Zstd, so dev and staging environments often serve Gzip and mask the real-world payload sizes a CDN will produce.
  • CDN re-compression varies by tier: Some CDNs strip Accept-Encoding: zstd on the way to the origin and re-compress at the edge at a lower level. Static assets miss out on the level-19 savings unless you precompress and serve .zst files directly.
  • No DecompressionStream support: The DecompressionStream API supports gzip, deflate, and deflate-raw widely but does not include zstd, so client-side Zstd decoding still needs a WebAssembly polyfill such as zstd-wasm in every browser.

In my experience, the most surprising failure is a CDN silently downgrading Zstd to Brotli for Safari clients while a single Accept-Encoding header parser at the edge gets confused by zstd, br appearing together. The fix is to log the Vary: Accept-Encoding header on a cache-miss and confirm the edge actually served zstd to Chrome and Brotli to Safari, rather than serving Brotli to both.

...

Citations

All Zstd version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests