UtiliKit
Back to blog

Lossless vs Lossy Image Compression in 5 Minutes

Published: November 12, 2026 - 6 min read

Lossless compression makes an image file smaller and gives you back every pixel exactly as it was. Lossy compression throws away detail you're unlikely to notice and makes the file far smaller still. For photos, lossy wins by a factor of five to ten. For screenshots, logos and anything with text in it, lossless often produces the smaller file as well as the cleaner one, which surprises people.

The rest of this page is the evidence, plus a few traps.

The numbers from a quick test

I ran four images through the same encoders: three 1920 × 1080 pictures (an exterior with a lot of foliage, a plain interior, and an interior with heavy texture) and one screenshot-style graphic at 1600 × 900 with lines of text and flat coloured bars. Uncompressed, a 1920 × 1080 image is about 6.2 MB.

ImagePNG (lossless)WebP losslessJPG quality 90JPG quality 80
Exterior, foliage1,996 KB1,297 KB408 KB255 KB
Interior, plain walls873 KB637 KB185 KB119 KB
Interior, heavy texture2,636 KB1,715 KB504 KB302 KB
Text-and-bars graphic89 KB6 KB178 KB146 KB

Read the first three rows and lossy is the obvious choice: JPG at quality 80 is seven to nine times smaller than PNG, and lossy WebP at quality 80 went lower again on the same pictures (170 KB, 51 KB and 221 KB). Read the last row and it flips. The PNG of the graphic is 89 KB, the JPG is 146 KB and looks worse, with a grey fuzz around every letter. Lossless WebP got the same graphic down to 6 KB.

One caveat. The three pictures started life as high-quality JPG exports, so treat the absolute sizes as indicative. The ratios are what matter, and they hold up on camera originals too.

How lossy compression decides what to drop

JPG cuts the picture into 8 × 8 pixel blocks and describes each block as a mix of smooth gradients and fine patterns. Then it rounds off the fine patterns, more aggressively as you lower the quality setting. It usually also stores colour at half the resolution of brightness, because eyes are much better at seeing changes in light and dark than changes in hue.

On a photo of a garden this is nearly invisible. Leaves are noisy anyway.

On text it shows at once, since a letter is nothing but sharp edges and sharp edges are exactly the fine detail being rounded away. You get faint ripples next to each stroke (called ringing), blocky patches in flat areas, and stripes in what should be a smooth sky. Lossy WebP works on similar principles with newer maths, so it reaches the same visible quality at a smaller size, but it's still discarding information.

How lossless compression gets smaller without losing anything

Lossless formats look for repetition and predictability. If a row has 400 identical white pixels, there's no need to write "white" 400 times. If each pixel is nearly the same as the one to its left, you can store the small differences and not the full values. PNG does this in two steps, a prediction filter and then the same DEFLATE algorithm that zip files use.

That explains the table. A screenshot is mostly flat colour, so it's extremely predictable and shrinks by 95% or more. A photo has sensor noise and texture in every pixel, nothing repeats exactly, and the best a lossless format managed in my test was a file two to seven times smaller than the raw data.

Lossless doesn't mean uncompressed and it doesn't mean high resolution, only that what comes out is bit-for-bit what went in.

Does re-saving a JPG ruin it? Less than you've heard

The usual warning is that a JPG gets worse every time you save it. I tested that on the exterior image, and the result is more interesting than the myth.

Saving the same file ten times in a row at quality 80, with no edits in between, changed almost nothing after the first save. The average pixel error against the original was 1.87 (on a 0 to 255 scale) after one save and 1.89 after ten. The encoder keeps making the same rounding decisions on the same blocks, so there's nothing new to lose.

Then I cropped 3 pixels off the top and left before each save, which shifts the 8 × 8 grid so the blocks no longer line up with the previous round. After ten rounds the error was 3.91, about double. The interior with heavy texture went from 2.41 to 4.74 under the same treatment.

So it isn't saving that hurts. It's editing and then saving: cropping, resizing, rotating or changing the quality setting between rounds. What should you do about it? Keep one lossless master (a PNG, or the original from the camera or phone), do your edits on that, and export to a lossy format once, at the end.

Short answer: which one to use

In practice that maps onto three tools here. The Image Compressor has a quality slider from 5 to 100 (it starts at 75) and shows the resulting size, so you can find the point where a photo still looks right. The Format Converter switches between JPG, PNG and WebP when the format is the problem. And when a form demands a specific ceiling, Compress to a File Size works backwards from the target, free for up to five photos per job. All three run in your browser and the files aren't uploaded anywhere.

If you're unsure which format suits a particular job, the JPG vs PNG vs WebP guide goes through it case by case.

Three mistakes that waste the most bytes

The first is saving photos as PNG "for quality". On the exterior test image that meant 1,996 KB where 255 KB looked identical at normal viewing size. Multiply by twenty product photos on one page and it's the difference between a page that loads and one that crawls.

The second is the reverse: screenshots saved as JPG, bigger and blurrier.

The third is converting a JPG to PNG to "restore" it. Nothing comes back. The detail was discarded when the JPG was made, and the PNG faithfully preserves every artefact while taking up several times the space. I'd only convert that way for a practical reason, such as needing transparency or planning several rounds of editing. Going the other way is usually the useful move, and the PNG to JPG settings guide covers how to do it without visible damage.

One last thing, because it beats every codec choice above. Pixel count matters more than compression type. Resizing a 4,000 px wide photo to 1,600 px removes 84% of the pixels before any encoder touches it, and no quality slider gives you that for free. If a file is stubbornly large, run it through the Image Resizer first and compress second.

Frequently asked questions

Is PNG always lossless?

The PNG format itself is lossless: whatever pixels you give it come back unchanged. Some PNG optimisers reduce the image to 256 colours before saving, though, and that colour reduction is a lossy step. The file is still a valid PNG, but it no longer matches the original exactly.

Is WebP lossy or lossless?

Both. WebP has a lossy mode that competes with JPG and a separate lossless mode that competes with PNG, and both support transparency. Which one you get depends on the setting in the tool that saved the file, so the .webp extension alone doesn't tell you.

Does lossless compression reduce image quality?

No. A losslessly compressed image decodes to exactly the same pixels as the original, so there's no quality change to see or measure. The only cost is that the saving is modest on photographs, where the file usually stays at a quarter to a half of the uncompressed size.

What JPG quality setting looks lossless?

There's no single number, but at 85 to 90 most people can't tell a JPG from its source at normal viewing size, and 75 to 80 is fine for most web photos. Check at 100% zoom around text, hard edges and skies, since those areas show artefacts first.

More guides