JPEG is the most widely used image format on the web — but it comes with a trade-off. Every time you compress a JPEG too aggressively, the image develops visible defects called compression artifacts. Understanding what they are and why they appear will help you choose the right quality settings and formats for your images.
What are JPEG artifacts?
JPEG is a lossy format — it permanently discards image data during compression. Artifacts are the visual defects that become visible when too much data is thrown away. The more aggressive the compression (the lower the quality setting), the more severe the artifacts.
Once you save an image as JPEG, the discarded data is gone forever. No software can recover it. Each subsequent re-save of the same JPEG file discards more data on top of what was already lost — this is called generation loss.
How JPEG compression works
To understand why artifacts look the way they do, it helps to know the basics of how JPEG compression operates:
- Block division — the image is divided into 8×8 pixel squares
- DCT transform — each block is converted from pixel values into frequency information using the Discrete Cosine Transform (DCT)
- Quantization — high-frequency detail (fine textures, sharp edges) is discarded based on the quality setting; lower quality = more discarding
- Encoding — the remaining data is compressed and stored
Because JPEG processes each 8×8 block independently, with no smoothing applied across block boundaries, the block structure becomes visible when compression is high. This is the root cause of the characteristic blocky look of over-compressed JPEGs.
The 4 main types of JPEG artifacts
1. Blocking (the most common)
Blocking artifacts appear as visible 8×8 pixel squares across the image. They are most noticeable in smooth areas such as blue sky backgrounds, skin tones, and gradients — regions where the block boundaries stand out because the surrounding pixels are so uniform.
The cause is the DCT block processing: each block is encoded independently, so neighboring blocks can end up with noticeably different average values along their shared edge. At quality settings below 50, blocking becomes severe enough to degrade the entire image.
2. Ringing (edge halos)
Ringing artifacts appear as light or dark halos around sharp edges — most visibly around text, logos, and high-contrast shapes. Text that should be crisp develops a faint ghost or blur on one or both sides.
The cause is the Gibbs phenomenon: reproducing a perfectly sharp edge requires high-frequency components in the DCT representation. JPEG discards those high frequencies at medium-to-low quality settings, which introduces the oscillating halo pattern. This is why JPEG is a poor choice for screenshots and diagrams with sharp text.
3. Color bleeding (chroma noise)
Color bleeding occurs when colors appear to "bleed" across edges or look incorrect near high-contrast boundaries. You might see a red object surrounded by a faint reddish fringe on the white background beside it.
JPEG compresses the color (chrominance) channels more aggressively than the brightness (luminance) channel, because human vision is less sensitive to color resolution than to brightness. This works well for gradual color changes but breaks down at sharp color transitions, especially in red and blue channels.
4. Mosquito noise
Mosquito noise appears as random pixel-level noise that clusters around edges and fine details. It looks like static or grain hovering near sharp objects — the name comes from its resemblance to a swarm of tiny insects when seen in video compression.
It is closely related to ringing: both are caused by insufficient high-frequency information in the DCT representation. Mosquito noise is especially visible around text on a plain background.
What triggers the worst artifacts
Certain types of images are particularly vulnerable to JPEG artifacts:
- Very low quality settings (below 60) — aggressive quantization makes all four artifact types severe
- Text-heavy images — screenshots, diagrams, and slides suffer from ringing and mosquito noise because they contain many sharp edges
- Solid colors with sharp boundaries — logos and graphics on plain backgrounds show blocking and color bleeding clearly
- Blue skies and smooth gradients — uniform regions make blocking boundaries visible even at moderate compression
- Re-saving JPEG files — each save cycle adds a new layer of artifacts on top of existing ones (generation loss)
How to avoid JPEG artifacts
Use quality 80–90 for web photos
This range gives an excellent balance between file size and visual quality. Artifacts at quality 80 are present but typically invisible to viewers unless they zoom in and compare side by side with the original.
Use PNG for text-heavy images
Screenshots, diagrams, slides, and logos compress better with lossless PNG than with JPEG. PNG eliminates ringing and mosquito noise entirely because no data is discarded.
Convert to WebP
WebP's lossy encoder handles block boundaries more gracefully than JPEG through an in-loop deblocking filter. The same perceived quality requires 25–35% less file size compared to JPEG, and artifacts are less severe at equivalent compression ratios.
Never re-save JPEG files
Always edit from originals and export once. Opening a JPEG, making changes, and saving again re-compresses already-compressed data. Keep source files in PNG or a raw format and export to JPEG only for final delivery.
Use AVIF for aggressive compression
When you need small files at low bitrates, AVIF handles compression far better than JPEG. AVIF uses newer coding technology with larger transform blocks and adaptive filtering, so artifacts at low quality are much softer than JPEG's hard block boundaries.
JPEG quality guide
| Quality | Artifact level | Best use |
|---|---|---|
| 90–100 | Nearly invisible | Archiving, print preparation |
| 80–90 | Hard to spot | Web photos, product images |
| 70–80 | Visible on close inspection | General web use, blog images |
| 60–70 | Noticeable | Thumbnails, low-priority images |
| Below 60 | Severe | Avoid except for tiny thumbnails |
Choose the right tool for your image
For most web photos, quality 80–85 in JPEG or WebP is the sweet spot. If your image contains text, logos, or sharp graphics, switch to PNG or convert to WebP lossless instead.
Picovert's image compressor lets you adjust the quality setting and preview the result before downloading so you can find the right balance for each image. To switch formats entirely — such as converting a JPEG to WebP or PNG — use the image converter.