How JPEG Compression Reduces Image Quality
By SimpleTools24Published 4 min read
JPEG compression makes photos much smaller by permanently discarding detail that's hard to notice. It stores colour at lower resolution than brightness, splits the image into 8×8 pixel blocks, converts each block into a set of frequency patterns, and then rounds those patterns off, keeping coarse shapes and throwing away fine texture. The quality setting controls how aggressive that rounding is. At high quality the loss is invisible; at low quality you see blocks, colour smears and halos around edges.
In this guide
Lossy vs Lossless
PNG, GIF and WebP lossless keep every pixel exactly. JPEG is lossy: the decoded image is close to the original but not identical. That trade-off is why a JPEG photo can be a fraction of the size of the same photo saved losslessly, and why JPEG is still the default for cameras and the web.
The Steps JPEG Takes
1. Separate Brightness From Colour
The image is converted from RGB into Y (brightness, or luma) and two colour-difference channels, Cb and Cr (chroma). Human vision is far more sensitive to brightness detail than to colour detail, and JPEG exploits that.
2. Reduce Colour Resolution (Chroma Subsampling)
Most JPEGs store chroma at half the width, and often half the height, of the brightness channel. This is written as 4:2:0 (half in both directions) or 4:2:2 (half horizontally). The image instantly loses colour precision with little visible change, except on sharp coloured edges, such as red text on blue, which become slightly fuzzy.
3. Split Into 8×8 Blocks
Each channel is divided into blocks of 8×8 pixels. Everything that follows happens inside each block independently, which is the root of JPEG's most recognisable artefact.
4. Transform Each Block (DCT)
A mathematical transform called the discrete cosine transform re-describes each block as a mix of 64 patterns, from a flat average (low frequency) to fine checkerboards (high frequency). Smooth areas need mostly low-frequency patterns; texture and sharp edges need high-frequency ones.
5. Quantise: Where the Loss Happens
Each of the 64 values is divided by a number from a quantisation table and rounded. High-frequency values are divided by bigger numbers, so many become zero. Lower quality settings use bigger divisors, so more detail rounds away.
6. Pack the Data
The remaining numbers, many of them zeros, are compressed losslessly with run-length and Huffman coding. This step doesn't lose anything; it just stores the result efficiently.
What the Quality Setting Means
There's no universal JPEG quality scale. Most programs map a 0–100 (or 1–12) slider onto scaled versions of standard quantisation tables, and the same number can mean different things in different apps. As a rough guide:
| Quality (0–100 scale) | Typical result |
|---|---|
| 90–100 | Visually lossless for most photos, larger files |
| 75–85 | Common web default; artefacts hard to spot |
| 50–70 | Smaller files; artefacts visible on edges and gradients |
| 20–40 | Obvious blocks and colour smears |
| Below 10 | Heavy blocking; detail largely gone |
The Artefacts You'll Recognise
- Blocking: visible 8×8 squares, especially in skies and smooth gradients, because each block is rounded separately.
- Ringing (mosquito noise): shimmering halos around sharp edges and text, from discarded high-frequency detail.
- Colour bleeding: colours smearing beyond edges, from chroma subsampling.
- Banding: smooth gradients turning into visible steps.
- Loss of texture: grass, hair and fabric becoming smooth or "painterly".
JPEG is particularly poor for screenshots, diagrams and text, where sharp edges are everywhere. PNG suits those much better.
Why Re-saving a JPEG Makes It Worse
Every time a JPEG is opened, edited and saved, it goes through quantisation again. Rounding errors from the previous save become "detail" that gets rounded again, so artefacts accumulate. This generation loss is why images that have been screenshotted, edited and re-shared many times look progressively worse, and it's a key ingredient of the deep-fried meme look.
Re-saving at exactly the same quality and dimensions loses less than you might expect, because values already rounded tend to round the same way. Cropping, resizing or changing quality between saves breaks that alignment and causes more damage.
See It for Yourself
The low quality image maker is a quick way to watch JPEG compression at work. Lower the JPEG quality slider and the 8×8 blocks appear in smooth areas; add recompression passes and the damage builds with each save. It runs in your browser, so you can test with your own photos without uploading them. For more ways to degrade an image deliberately, see how to make an image look low quality.
Practical Advice for Saving JPEGs
- Edit from the original, not from a previously saved JPEG.
- Save once, at the end, rather than after every step.
- Use quality around 80–90 for photos you'll share; go higher for archives.
- Choose PNG or WebP lossless for screenshots, logos and text.
- Resize before compressing. A smaller image at good quality often looks better than a large one at low quality.
If photos look worse after uploading them somewhere, the platform's own recompression is a likely cause; why images look blurry or pixelated covers that.
Frequently Asked Questions
Does opening a JPEG reduce its quality?
No. Only saving it again does, and only if it's re-encoded.
Is JPEG quality 100 lossless?
No. Quantisation and chroma subsampling can still lose a little, though usually invisibly.
Why does text look fuzzy in JPEGs?
Sharp edges need high-frequency detail, which JPEG discards first, causing ringing around letters.
Is WebP or AVIF better than JPEG?
At similar visual quality they usually produce smaller files, and both support lossless modes. JPEG remains the most universally supported.
Summary
JPEG throws away colour resolution and fine detail inside 8×8 blocks, controlled by the quality setting. Moderate settings are invisible; low settings and repeated saves create the blocks and smears everyone recognises.
Related tools
Sources
- JPEG (ISO/IEC 10918) overview – JPEG Committee (opens in a new tab)
- Digital Compression and Coding of Continuous-tone Still Images (ITU-T T.81) – ITU (opens in a new tab)
Related articles
- Make an Image Look Low QualityThe effects behind the "bad photo" look (resolution, JPEG artefacts, blur, noise, colour loss) and how to combine them.
- Why Images Look Blurry or PixelatedThe common reasons photos turn soft or blocky (upscaling, platform compression, wrong export settings) and how to prevent them.
- How to Make a Deep-Fried MemeWhat gives deep-fried memes their overcooked look, and the settings that recreate it.