Lossy vs lossless image compression, explained

Updated

Lossy vs lossless image compression, explained

Lossy compression (JPG, WebP, AVIF) throws away fine detail your eye usually misses so a photo can shrink to a fraction of its size. Lossless compression (PNG) keeps every pixel identical, which is why logos stay crisp and photographs stay huge. Pick the format that matches the picture, then compress in your browser with EditItAll — nothing is uploaded.

Do it now — free, in your browser

Open the image compressor

What lossy and lossless actually do

Lossy compression rebuilds a picture that looks the same to you while discarding data the encoder decides you will not notice — faint noise, tiny colour shifts, detail in shadows. That is how a camera JPEG can be a few megabytes and still look sharp on a phone. The trade is real: the discarded data is gone. Open the file later and you cannot get it back.

Lossless compression stores a recipe for every pixel. Decode it and you get the original grid back, exactly. The file only shrinks when neighbouring pixels repeat — solid colour, text, UI, screenshots. A photograph has almost none of that repetition, so lossless barely helps.

Which formats are which

The format is the decision, not a slider setting:

  • JPEG is lossy only. It is the universal photo format. A quality around 75–82 is usually indistinguishable on screen.
  • PNG is lossless and supports transparency. It is the right home for logos, icons, screenshots and anything that must stay pixel-identical.
  • WebP and AVIF can do both. Lossy WebP or AVIF usually beats JPEG at the same visible quality. At the top of the quality slider they can also write a lossless file.

Saving a JPEG as PNG does not restore lost detail. It stores the already-lossy photo losslessly, so the file usually grows. That trap is covered in why PNG files are so large.

Choose a method, then compress once

A practical rule: photographs go through a lossy format; flat graphics stay lossless.

  • Photo for the web, email, or a form. Open the image compressor, keep JPG or switch to WebP, start near quality 80, and read the in → out size on each file. Nudge the slider. There is no target-size field — the listed size is the output.
  • Logo, icon, screenshot, UI with transparency. Stay on PNG and compress the PNG. Default PNG recompress is lossless: every pixel, including the alpha channel, stays identical. The file just packs tighter.

Everything runs on your device. Files are never uploaded, EXIF is stripped on export, and a batch downloads as a ZIP. You can go offline after the page loads. More in compressing without visible quality loss and the compressing images cluster.

What lossless cannot fix

Lossless will not make a photograph small. It will not undo a harsh JPEG. It will not change width and height — that is resizing, a different job explained in resizing vs compressing.

If you still need to edit the photo later, keep the original and compress a copy. Lossy stacking — saving a JPEG, then compressing that JPEG again — adds artefacts each time. One pass from the original is the honest loop.

Ready to try it?

Free, no sign-up, and nothing you open ever leaves your device.

Frequently asked questions

Is lossless always better quality?+

Lossless is exact, not automatically prettier. A well-encoded JPEG at quality 80 often looks identical to the original on a screen while being much smaller. Lossless matters when pixels must stay identical — logos, screenshots, files you will edit again.

Is JPEG lossless?+

No. JPEG is lossy only. Every save throws away some detail. Keep an original and compress from that once, rather than re-saving the same JPEG over and over.

Can WebP be lossless?+

Yes. WebP and AVIF support both modes. On EditItAll, pushing the quality slider to the top can write a lossless WebP or AVIF. For everyday photos, a lossy setting around 80 is the usual sweet spot.

Why is my PNG barely smaller after compressing?+

PNG is lossless and only shrinks flat graphics well. A photograph saved as PNG has little repetition to pack, so the file stays large. Convert the photo to JPG or WebP if size is the goal.

Are my files uploaded when I compress them?+

No. EditItAll compresses entirely in your browser. The file never leaves your device, and the page still works if you go offline after it loads.

Related guides

More guides on compressing images →