Compression artifacts: blocking, ringing and banding

Three characteristic faults appear when an image has been compressed too hard. Each has a different cause, and each tells you something different about what to change.

The three to recognise

Blocking
Visible 8 × 8 squares in smooth areas. Cause: quantization too aggressive. Appears below quality ~55.
Ringing
Ghost echoes beside hard edges, especially text. Cause: sharp transitions in a frequency-based codec. Appears at any quality on graphics.
Banding
Stripes across a gradient instead of a smooth fade. Cause: too few distinct values left. Appears in skies and studio backdrops.
Colour smearing
Fringing around saturated text. Cause: chroma subsampling, not the quality setting.
Safe range for photographs
Quality 75–85.
Where to look first
Flat sky, skin, out-of-focus backgrounds and any hard edge.

Recognising and fixing each one

Blocking

The image breaks into visible squares, most obviously in areas that should be smooth — a clear sky, a wall, a shadow.

The cause is structural. JPEG processes the image in independent 8 × 8 blocks, and when quantization is aggressive enough, each block is reduced to so few surviving coefficients that its average colour drifts from its neighbours. The block boundaries stop lining up, and you see the grid.

The fix: raise the quality. Blocking is the clearest signal that you have gone too far — below about 55 on most photographs. It cannot be fixed by resizing or by changing format after the fact, because the damage is already in the pixels.

Ringing

Faint ghost echoes appear either side of a hard edge — around text, around a logo's outline, along a roofline against bright sky. It is sometimes called mosquito noise, because it shimmers around edges in video.

The cause is a mismatch between the content and the codec. Describing an instantaneous jump from black to white requires an infinite series of wave patterns; the encoder keeps a finite number, and the truncated series overshoots and undershoots around the edge.

The fix: usually not a quality setting at all. Ringing on text means the image should not be a JPEG. Move it to PNG or lossless WebP and it disappears completely, often at a smaller file size too.

Banding

A gradient that should fade smoothly instead steps through visible stripes — most often a sunset, a clear blue sky, or a studio backdrop.

Two things cause it. Quantization can leave too few distinct values to represent a slow transition, so neighbouring regions snap to the same value. And 8-bit colour only has 256 levels per channel to begin with, which is marginal for a very gradual fade across a wide frame.

The fix: raise the quality — banding appears earlier than blocking, so a gradient-heavy image may need 85 where a textured one is fine at 75. Some encoders can add a small amount of dither, which trades faint noise for a smooth appearance.

Colour smearing, which is not a quality problem

Red text on white looks muddy and orange at the edges. Thin saturated lines lose their colour or bleed sideways. Raising the quality barely helps.

This is chroma subsampling, and it is a separate lossy step from quantization. The encoder stores colour at half resolution in each direction, which is invisible on photographs and destructive on saturated fine detail.

The fix: use a format and encoder that keeps colour at full resolution (4:4:4), or — far more practically — recognise that an image of coloured text belongs in PNG.

How to judge without fooling yourself

Look at the image at the size it will actually be displayed, not zoomed to 400% in a viewer. Artefacts that are obvious under magnification are frequently invisible at display size, and optimising against a zoomed view wastes bytes on nobody's behalf.

Then do look deliberately at the places faults appear first: large flat areas, gradients, skin tones, and any hard boundary between contrasting colours. If those are clean, the image is clean.

The most reliable way to judge is a direct comparison against the original at the same scale — which is what the before-and-after slider on the tool pages is for.

Artefacts that come from re-saving

If an image looks smeared and blotchy in a way that does not match any single description above, it has probably been through several lossy saves. Each one re-quantises data that was already quantised, treating the last pass's errors as real detail and adding new errors on top.

This is generation loss, and no setting undoes it. Go back to the original file and compress it once.

Try it yourself

Everything below runs in your browser, so you can test any of this on your own files without uploading them.

  • Compress JPEG

    Shrink JPG and JPEG photographs with a quality slider or an exact target size.

    Open the tool
  • Compress PNG

    Lossless by default, with transparency carried through untouched.

    Open the tool
  • Compress WebP

    Re-encode existing WebP files, or convert JPEG and PNG into WebP.

    Open the tool

Questions

Frequently asked questions

Every answer below is present in the page source, expanded, so it can be read without opening anything.

At what quality do artifacts become visible?

It depends on content. For a textured photograph, artefacts stay invisible down to about quality 70. For an image with large smooth gradients — sky, studio backdrop — banding can appear as high as 80. For text and line art, ringing is visible at every quality, which is the signal to change format rather than settings.

Can compression artifacts be removed afterwards?

Not genuinely. Some filters can blur blocking or smooth banding, but they do it by discarding more detail — the original information was destroyed at the moment of compression. The only real fix is to go back to the original file and compress it less aggressively.

Why does my screenshot look dirty as a JPEG?

Two artefacts at once: ringing around every hard edge, and colour smearing from chroma subsampling if the text is coloured. Screenshots are the worst possible content for a lossy encoder. Save it as PNG or lossless WebP and both disappear — usually at a smaller file size as well.

Why does one photo compress cleanly and another band badly?

Texture hides artefacts and smoothness exposes them. A photograph of foliage or gravel has fine detail everywhere, which masks the encoder's approximations. A clear sky has nothing to hide behind, so every step in the gradient shows. Gradient-heavy images legitimately need a higher quality setting.

Does WebP have the same artifacts?

It has ringing and banding, but far less blocking, because it predicts each block from its neighbours rather than encoding them independently. At low quality WebP tends to go soft rather than break into squares, which is generally the more forgiving failure.

Is there a way to compress without any artifacts at all?

Yes — use a lossless format. PNG and lossless WebP introduce no artefacts of any kind at any zoom level, because they discard nothing. The trade is a much larger file for photographic content.

From the blog

Related reading

Longer, more practical guides from the blog.

  • Image Compression

    JPEG Quality Settings Explained: What the Number Actually Means

    Quality 80 is not 80% of anything. It is an index into a quantisation table. Measured on one photograph: dropping from 100 to 90 removes 77% of the file and 4.2 dB of fidelity; dropping from 40 to 30 removes 17% and costs almost as much.

    8 min read

  • Image Formats

    PNG vs JPEG: When to Use Each, With the File Sizes to Prove It

    PNG stored the same photograph in 1274.1 KB where JPEG needed 67.5 KB — nineteen times larger. On a flat graphic PNG won. On a smooth gradient PNG lost to JPEG by a factor of two, which surprises most people.

    9 min read

  • Practical Guides

    How to Compress Images for a Website Without Wrecking Them

    Resize before you compress. Measured on one photograph: half the width at quality 80 produced a 16.4 KB file, while full width at quality 40 produced 20.6 KB and looked far worse. The order of operations matters more than the settings.

    8 min read