What the JPEG Quality Slider Actually Does (It's Not What You Think)
Most people treat quality 80 as "80% of the original detail". That's not how JPEG works. Here's the actual DCT quantisation process behind the number.
Most users treat the JPEG quality slider as a simple fidelity percentage where 100 represents a perfect copy and 50 represents half the original detail. While this idea is common, it is simply not how the compression works. The quality number is a scalar that adjusts a quantisation table — a matrix of divisors applied to frequency components. Understanding this changes how you choose quality settings.
What Actually Happens Inside the JPEG Encoder
JPEG compression has five main steps:
- 1.Colour space conversion: RGB → YCbCr (separates brightness from colour)
- 2.Block splitting: Image divided into 8×8 pixel tiles
- 3.DCT (Discrete Cosine Transform): Each 8×8 block transformed into 64 frequency coefficients
- 4.Quantisation: Each coefficient divided by a value from the quantisation table and rounded — this is where data is permanently lost
- 5.Entropy coding: The quantised values are Huffman-coded for further (lossless) compression
The Quality Number Scales the Quantisation Table
The quality value (1–100) doesn't directly measure how much of the image is preserved. It scales the quantisation table: at quality 100, divisors approach 1 (minimal loss); at quality 50, divisors are the standard JPEG table values; at quality 1, divisors are 100× the standard table (extreme loss).
The quality scale is non-linear and encoder-dependent. Quality 80 in Photoshop, quality 80 in libjpeg, quality 80 in ImageMagick, and quality 80 in a browser Canvas API all produce different file sizes and artifact profiles — they're all using different quantisation tables.
Why Quality 95 Is Usually Overkill
The relationship between quality and file size is extremely non-linear at the high end. Going from quality 80 to quality 85 might add 20% to file size for a marginal quality gain. Going from 85 to 95 might double the file size for an improvement that's visible only under 200% zoom on an calibrated display.
// Approximate file size relationship (varies by image content):
// Quality 70 → baseline file size × 0.5
// Quality 75 → baseline × 0.65
// Quality 80 → baseline × 0.8 ← typical sweet spot
// Quality 85 → baseline × 1.0 ← "baseline" for this example
// Quality 90 → baseline × 1.4
// Quality 95 → baseline × 2.2
// Quality 99 → baseline × 4.0+
// Quality 100 → baseline × 8–15× (minimal compression, all coefficients kept)High-Frequency vs. Low-Frequency Content
The quantisation table is not uniform — it applies heavier quantisation to high-frequency coefficients (fine detail, sharp edges) than to low-frequency ones (broad tones, gradual gradients). This is why:
- ●Photos of clear sky compress very well — mostly low-frequency content
- ●Photos of forest leaves or animal fur compress poorly — dominated by high-frequency detail
- ●Text and hard edges show ringing artifacts — DCT cannot represent discontinuities cleanly
- ●The same quality setting produces wildly different file sizes on different images
| Quality | File size | Visual result | Recommended for |
|---|---|---|---|
| 100 | 3–8 MB | Mathematically minimal loss | Archive only |
| 90–95 | 1–2 MB | Virtually identical to original | Print intermediates, re-edit sources |
| 85 | 600–900 KB | Indistinguishable at normal view | Images recompressed by third parties |
| 80 | 350–550 KB | Indistinguishable at screen resolution | Web use — optimal sweet spot |
| 75 | 250–400 KB | Detectable under 200% zoom | Thumbnails, non-critical images |
| 60–70 | 150–250 KB | Visible artifacts in smooth areas | Strict bandwidth budgets only |
| Below 50 | Under 150 KB | Clearly degraded | Avoid |
Practical Quality Recommendations
- ●Quality 75–80: Optimal for photographs on web pages — invisible quality loss, 60–70% smaller than quality 95
- ●Quality 85: For images that will be recompressed by third parties (social platforms, CDNs)
- ●Quality 90+: Only for print intermediates or images that will be edited again
- ●Never quality 100: Produces minimal compression for no visible benefit at screen resolution
The live size estimate in our image compressor updates as you drag the quality slider — this gives you a direct measure of the quality/size trade-off for your specific image content.
Ready to try it?
All tools run entirely in your browser — no uploads, no account required.
Compress Image