What lossless actually means
Every pixel you put into a PNG comes back out identical. Not visually identical — bit-for-bit identical.
That is a stronger guarantee than it sounds, and it is the whole reason to choose the format. Save a PNG, open it, edit it, save it again, repeat a hundred times: the image is exactly what it was. Do the same with a JPG and it degrades every time.
PNG achieves this by finding genuine patterns — runs of identical pixels, rows that resemble the row above — and encoding those efficiently with DEFLATE. Nothing is discarded, only described more compactly.
Why photographs make PNG enormous
Lossless compression can only exploit patterns that actually exist.
A screenshot has enormous amounts of exact repetition: flat backgrounds, identical letterforms, straight lines. PNG compresses that superbly.
A photograph has almost none. Every pixel differs slightly from its neighbour because of sensor noise and natural texture, and there is very little exact repetition to find. So PNG stores something close to the raw pixel data.
The measured gap is dramatic. On the fixed test image used across this site, the same picture was 3.97 MB as PNG and 375 KB as JPG.
What PNG is genuinely the right answer for
- Screenshots, especially any containing text
- Logos and icons, particularly against transparent backgrounds
- Diagrams, charts and line art
- Working copies you will edit repeatedly
- Anything where a pixel being exactly right matters
Transparency is the reason PNG persists
PNG stores an alpha value per pixel, so transparency can be partial. A logo with soft antialiased edges composites cleanly onto any background colour, rather than showing a fringe.
That is why PNG remains ubiquitous in design and interface work even though WebP and AVIF now do the same thing in far smaller files.
Making a PNG smaller
Two routes, with very different characters:
Lossless optimisation rewrites the file’s compression without altering a single pixel. On our photographic test image it saved 15%; on screenshots and flat graphics it typically does considerably better. Nothing is damaged.
Converting to a lossy format saves far more. On the same test image, WebP was 94% smaller and AVIF 97% smaller. Both keep transparency. The cost is that text and hard edges soften slightly.
For screenshots of code or diagrams with fine hairlines, take the lossless route. For photographs that happen to be stored as PNG, convert without hesitation.