Lossy vs Lossless Compression Explained

Learn what each compression type preserves, where artifacts come from, and how to choose for photos, graphics, and working files.

By ConvertHop · Published · Reviewed · 2 min read

Lossless and lossy describe whether compressed data can reconstruct the encoded pixels exactly. The terms do not automatically mean “high quality” and “low quality.” They describe the method and its trade-offs.

A well-made lossy photograph can look excellent and be far smaller than a lossless version. A lossless image can still be a poor source if it was previously enlarged or converted from a heavily compressed JPEG.

A generation-loss experiment with a text edge

Create or choose a non-sensitive graphic with small dark text on a pale background. Make one JPEG copy from the master, then re-export that JPEG several times with a lossy setting. Compare the final copy with a single export made directly from the master. Differences will depend on the encoder, but fine edge artifacts are a better inspection target than an empty flat area.

Now save a JPEG as PNG. The PNG will encode the decoded pixels losslessly, including any artifacts already present. This distinguishes “no new lossy encoding” from “restored original.” Keep a lossless master for further edits and create a fresh delivery copy for each destination. Do not repeatedly save a previously compressed export just to make its filename or format consistent.

What lossless preserves

Lossless encoding preserves every encoded pixel through a reversible representation. It is valuable for screenshots, line art, transparency, intermediate assets, and cases where exact pixels matter. PNG is the familiar example.

What lossy removes

Lossy encoders simplify image information to reduce size. With sensible settings, changes can be hard to notice at normal viewing sizes. Strong compression can create blocking, ringing near edges, smeared texture, or banding in gradients.

Editing and generation loss

Opening a JPEG is not harmful by itself. Re-encoding it after edits can discard more information. Keep a lossless or original master and export delivery copies from that source instead of repeatedly editing prior exports.

Transparency and format choice

JPEG cannot represent transparent pixels. PNG and WebP can. Flattening transparency onto white or another color is irreversible in the exported file, so confirm the intended background before conversion.

A practical choice

Use lossless output for graphics, transparency, and editable intermediates. Use lossy output for photographic delivery where bandwidth or upload limits matter. Keep the source regardless of the delivery choice.

Key takeaways

  • Lossless means reversible pixel encoding.
  • Lossy can be visually strong at much smaller sizes.
  • Repeated lossy encoding compounds artifacts.
  • Preserve an original or master file.

Put this into practice

Use the Image Compressor to work with your own files locally in your browser. Keep the original and verify every downloaded result before relying on it.

Related guides

Find your tool

6 tools available