# Lossy vs lossless compression, explained plainly

Lossless compression packs the same data into less space, so the file opens exactly as it was. Lossy compression throws away detail you are unlikely to notice, which makes far smaller files that are close to the original but not identical.

## Lossless: the same picture, packed better

Lossless methods look for repetition and describe it more briefly. A row of two hundred identical white pixels can be stored as "white, two hundred times". Nothing is discarded, so decompressing gives back every pixel exactly. PNG works this way, which is why it suits screenshots, logos and diagrams: large flat areas and sharp edges compress well and stay perfect.

The limit is that a photograph has almost no exact repetition. Every pixel differs slightly from its neighbour, so a lossless photo stays large.

## Lossy: a nearly identical picture, much smaller

Lossy methods use the fact that eyes are more sensitive to some things than others. We notice brightness more than colour, and broad shapes more than fine texture. JPG, WebP and AVIF store the important parts precisely and the rest approximately. A quality setting controls how much is approximated.

At a high setting the loss is invisible. Push the setting down and it shows as blocks, smeared texture and faint halos around sharp edges.

## Which to use

- Photographs: lossy. JPG for the widest compatibility, WebP or AVIF for smaller files on the web.
- Screenshots, logos, diagrams and anything with text: lossless PNG, or WebP if size matters.
- A working copy you will edit and re-save many times: lossless, because lossy formats lose a little more each time they are saved.
- Anything with a transparent background: PNG, WebP or AVIF. JPG cannot store transparency.

## A common mistake

Saving a photo as PNG "for quality". The file becomes much larger and looks the same as a high-quality JPG. The reverse mistake is saving a logo or screenshot as a low-quality JPG, which smudges every edge. Match the method to the kind of picture.

Tool for this: [Compress an image](https://kotelo.co/compress-image)

Last checked: 2026-11-28. Source page: https://kotelo.co/guides/lossy-vs-lossless-compression
