Lossy vs Lossless Compression
Choose between much smaller files and exact decoded pixels by understanding what each compression method preserves, removes and is best used for.
Updated September 5, 2026
On this page
The essential difference
Lossless compression can reconstruct the encoded pixels exactly. Lossy compression permanently removes selected information to reach a smaller file.
“Lossless” does not mean uncompressed, and “lossy” does not automatically mean visibly poor. The useful choice depends on the image, where it sits in the workflow and how closely people need to inspect it.
When lossless is the right choice
Use lossless encoding when exact pixels matter or the image will be edited repeatedly. Common examples include:
- pixel art and small interface graphics;
- screenshots containing text;
- diagrams with flat colors and sharp boundaries;
- masks and technical image data;
- intermediate files exchanged between editing steps;
- archival masters when the chosen format preserves everything required.
Lossless files are not automatically small. A noisy photograph contains little repetition and can remain large even with an efficient lossless encoder.
When lossy is the right choice
Lossy encoding is usually appropriate for web photographs, social media exports and preview images. It can simplify texture and color information that is less noticeable at normal viewing size.
The goal is not the lowest possible quality. It is a controlled trade: enough reduction to improve delivery while keeping visible details that matter to the purpose of the image.
Artifacts to inspect
Different encoders create different failure patterns, but common warning signs include:
- block boundaries around high-contrast detail;
- ringing or ripples near text and edges;
- banding in skies and gradients;
- smeared hair, grass or fabric;
- muddy color boundaries;
- halos around transparent subjects.
Review these areas at normal size and at 100 percent. Extreme zoom is useful for diagnosis but can make harmless differences look important.
Why repeated lossy saves are risky
Each lossy export works from the pixels it receives. Opening a compressed JPEG, editing it and saving another JPEG may discard information again. After several generations, artifacts can become obvious even if every save uses a moderate quality.
Keep a lossless or high-quality master and create delivery copies from it. Do not use a small web export as the only source for future formats.
Format is not the same as compression mode
JPEG is normally lossy. PNG is normally lossless. WebP and AVIF can support more than one mode, depending on the encoder and application. SVG is vector data rather than a raster compression choice.
Always verify the actual export settings. A filename alone does not tell you the quality level, whether metadata was retained, or how color was handled.
A decision checklist
Choose lossless when:
- exact pixels have functional value;
- text and hard edges must remain pristine;
- the file is an editing intermediate;
- the size remains reasonable for the intended use.
Choose lossy when:
- the image is photographic;
- transfer size and loading speed matter;
- small, inspected changes are acceptable;
- you can preserve a separate master.
Test fairly
- Resize every candidate to identical dimensions.
- Remove or retain metadata consistently.
- Compare at matched perceived quality, not matching slider numbers.
- Inspect difficult crops and the full composition.
- Record file size and the export settings.
- Test the file in the destination application.
The most effective pipeline often uses both: lossless masters for production and carefully tuned lossy derivatives for delivery.