JPEG Artifacts Explained: What Those Blocks and Halos Actually Are
JPEG artifacts are predictable side effects of lossy compression. Learn to spot blocking, banding, halos, and mosquito noise, and how to avoid stacking another save before you publish.
By Rehan Baqir
JPEG artifacts are block edges, banded gradients, halos, and speckles left by lossy compression. Compress Image can export a web JPEG once from a master. It cannot put back detail a previous save already discarded. A hero can look pixelated on a phone at 6000 px wide if it was saved around quality 55, cropped in a CMS, and re-exported by an "optimize images" plugin around quality 60. Three lossy passes can turn the sky into a chessboard. The limit is stacked recompression, not a lack of pixels.
Those marks are the fingerprints of the quality setting and of every later save. Once you know the shapes, you stop blaming the screen.
How JPEG compression creates artifacts
JPEG is lossy. The encoder:
- Converts color to frequency data (DCT) in 8 by 8 blocks
- Quantizes, which throws away high-frequency detail it judges unimportant
- Encodes what is left
When quantization is aggressive (a low quality setting), blocks do not blend smoothly. Edges ring. Gradients staircase. Fine texture turns to mush.
That is how the format works, not a bug in the export dialog.
The kinds of JPEG artifacts
Blocking (macroblocking)
Visible squares appear in areas that should be smooth: blue sky, a beige wall, a skin shadow. They are most obvious below about quality 70 on a large display.
Raise quality, switch to WebP at a similar byte size, or (a rare photographer's trick) add a little real noise in the source before export.
Color banding
Skies shift in discrete stripes. The gradient is no longer continuous. JPEG shares the blame with 8-bit color depth. Compression makes it worse.
Raise quality, apply a slight gaussian blur on the sky only before export (used in production, and argued about), or switch to WebP.
Ringing (halos)
Bright or dark outlines sit along sharp edges: a white shirt against a black jacket, or text on a screenshot saved as JPEG.
Do not save screenshots that contain text as JPEG. Use PNG or lossless WebP. For photos, a moderate quality increase is the usual fix.
Mosquito noise
Fuzzy speckles swarm high-contrast edges: hair against sky, tree branches against clouds. The name comes from the insect-like look.
Use less aggressive compression. Avoid sharpening after a heavy JPEG save.
Color bleeding
Chroma subsampling merges color channels aggressively. The common mode is 4:2:0. Red text on white picks up pink fringes, and fine colored patterns smear.
Export with 4:4:4 chroma if the tool allows it. Use PNG for graphics that include colored text.
Why artifacts stack
Every Save As JPEG re-quantizes data that was already quantized. Social platforms, CMS plugins, and email clients often recompress on upload.
Camera JPEG (Q92) → Canva export (Q80) → CMS "optimize" (Q75) → Instagram re-encode
Each hop adds damage. The workflow rule is one lossy hop from the master.
Keep a TIFF or a high-quality master. Export the web JPEG once via Compress Image. Do not re-save the web file.
Step-by-step artifact audit
- Open the suspect image at 100% zoom, not fit-to-window.
- Pan across sky, shadow, skin, and fine pattern. Note blocks and banding.
- Check edges for halos and mosquito noise near contrast boundaries.
- Trace provenance. How many times was this JPEG saved?
- Re-export from the best master at quality 82 to 88, then adjust after a visual check.
- Compare bytes. If the new file is only about 10% larger and the artifacts are gone, ship it.
- Disable CMS double compression if a plugin re-encodes uploads blindly.
If the master is lost and the artifacts are severe, reshoot or find another source. Denoise tools help only at the margin.
Format comparison when artifacts matter
| Content | Safer format | Why | |---------|--------------|-----| | Photo hero | WebP or JPEG Q85+ | Size vs quality balance | | Screenshot | PNG / WebP lossless | Text edges | | Logo on photo | PNG overlay, don't bake JPEG | Halos on logo edge | | Thumbnail | JPEG Q70 to 75 | Small display hides sins | | Archival | TIFF / RAW | No generation loss |
See PNG vs JPG Guide for graphics versus photos, and WebP vs JPG for modern photo delivery.
Real-world examples
A band poster with fluorescent gradients banded at Q65. Q82 fixed the banding and the file grew 40 KB. That increase was worth it.
A LinkedIn headshot gets recompressed by LinkedIn. Starting from Q95 instead of Q75 kept the skin acceptable after upload.
A blog image at 1200 px wide and Q80 showed no visible artifacts on a retina phone. The same image at Q60 showed mosquito noise in the hair.
The numbers shift per image. Your own zoom test is the spec.
Common mistakes
Saving screenshots as JPEG turns text into soup. Use PNG.
Editing in JPEG layers adds a generation every time you flatten and save. Edit a lossless working file.
A high pixel count does not hide a low quality setting. A 6000 by 4000 image at Q50 still blocks when you zoom.
Sharpening after compression amplifies ringing halos.
Ignoring resize order does the same damage in a different order. Resize from the master, then compress once. Compressing first and then resizing the damaged file keeps the damage.
Privacy note
Artifact inspection is local work. A random "JPEG fixer" website uploads the image. Use browser tools that process on the device: Compress Image, and JPG to PNG when you need a lossless hop.
Alternatives when JPEG will not behave
- WebP lossy is often cleaner at the same file size (WebP Converter)
- PNG fits UI, diagrams, and anything with text
- AVIF is newer and efficient. Check the fallback plan.
- One clean file at 280 KB beats two garbage passes at 140 KB each
Read how image compression affects quality for how to think about the quality slider.
Limitations
Once mosquito noise and 8 by 8 block boundaries are baked into a low-quality JPEG, converting the file to PNG or re-saving at 100% quality only inflates the byte size. The lost detail stays lost.
Conclusion
Spot the blocks, bands, halos, and mosquito noise at 100% zoom. Re-export once from a real master, pick PNG or lossless WebP when the image contains text or UI, and stop plugins from compressing a file you already compressed. A third-generation JPEG cannot return to the RAW. Another save only adds a fourth generation of the same damage.
Frequently Asked Questions
Common questions answered to help you get the most from this tool.