← All benchmarksDevOps

gzip vs brotli on a 2.72 MB JSON response: 0.34 MB vs 0.25 MB

How much smaller is a JSON API response with gzip or brotli?

A 20,000-row JSON response of 2.72 MB compressed to 0.34 MB with gzip -6 (12%), 0.30 MB with brotli q5 and 0.25 MB with brotli q11.

Results

raw2.72 MB
gzip -60.34 MB
brotli q50.30 MB
brotli q110.25 MB

How it was measured

Synthetic repetitive order records.

gzip on; # nginx

Why

Repetitive text compresses very well.

When this does not apply

Images and video do not; high brotli levels cost CPU.

Environment

MacBook Air (Apple silicon, 8 cores), macOS. Measured 2026-10-12.

Source: shorts/demo-ticket/w2 in my content-engine repository. Treat any single run as a direction; re-run it on your hardware.

Related

By Josué Barros, senior software engineer (full-stack, data and AI).