Skip to content
GivenTool

Lossy vs lossless image compression

Updated 2026-09-20

Lossless compression stores the exact pixels in fewer bytes by finding repetition, the way ZIP does; decompressing gives back the identical image. PNG, lossless WebP, GIF and TIFF-LZW work this way. Lossy compression discards detail the eye is unlikely to notice, mostly fine colour variation, and can shrink a photo ten to twenty times with no visible change at normal viewing size. JPEG, lossy WebP, HEIC and AVIF are lossy.

Which you need depends on the content and the destination. Photos tolerate lossy compression extremely well; text, line art and screenshots do not. And when a form says "under 200 KB", only lossy compression (plus resizing) will get a photo there.

Side by side

CriterionLossyLossless
Pixels after decompressionApproximation of the originalIdentical to the original
Typical size for a photo5 to 10% of raw pixels30 to 60% of raw pixels
Typical size for a screenshot with textSimilar or larger, with fuzzy edgesSmall, because flat colour compresses well
Repeated savesQuality degrades each time (generation loss)No change however many times
Adjustable quality settingYes (0 to 100)No; only compression effort
FormatsJPEG, lossy WebP, HEIC, AVIFPNG, lossless WebP, GIF, TIFF, BMP
Reaches a KB targetYes, by lowering quality then resizingOnly by resizing or reducing colours

Where the bytes go

A 12-megapixel photo is 36 MB of raw pixels. A lossless PNG of it is usually 15 to 20 MB, because photographic noise looks random to the compressor. The same photo as a JPEG at 90% quality is 3 to 4 MB, at 80% about 2 MB, and at 60% under 1 MB. JPEG achieves this by converting to a luminance-plus-colour representation, subsampling the colour channels, and rounding away the high-frequency detail in each 8 × 8 block in proportion to the quality setting.

The visible cost appears first around sharp, high-contrast edges as faint ringing and blockiness, and in smooth gradients as banding. Between 75 and 92% quality most photos show none of this at screen size; below 60% it becomes obvious on close inspection; at 30% it is obvious at any size.

Why screenshots and logos want lossless

Text and line art are exactly the high-contrast edges JPEG handles worst. A screenshot saved as JPEG gets grey smudges around every letter and, because it has few colours to begin with, the file is not even smaller than the PNG. Keep interface captures, diagrams, logos and anything with transparency in PNG or lossless WebP.

Lossless formats can still be made smaller without loss: reducing a PNG to 256 colours (PNG-8) when the image has few colours, stripping metadata, and choosing lossless WebP over PNG each save 20 to 60% with identical pixels.

Hitting a file-size limit

Portals that say "under 200 KB" or "between 20 and 50 KB" are asking for lossy compression, usually combined with a smaller pixel size. The image compressors on this site search for the highest JPEG quality that fits the limit and only shrink the dimensions when quality alone cannot get there, which keeps the picture as sharp as the limit allows. Resize to the portal's pixel size first, then compress; compressing a 4000-pixel image to 50 KB wastes the quality budget on pixels the portal will discard.

Which should I use?

  • If you are…Uploading a photo with a KB limitChooseLossyOnly lossy compression can bring a photo under 200 KB without shrinking it to a thumbnail.
  • If you are…Saving a screenshot, diagram or logoChooseLosslessSharp edges and text stay crisp, and the file is small anyway because the image has few colours.
  • If you are…Archiving originals you may edit againChooseLosslessEvery lossy re-save loses a little more; keep a lossless (or original camera) master.
  • If you are…Serving photos on a websiteChooseLossyPage weight matters and nobody can see the difference at 80 to 85% quality.

Frequently asked questions

What JPEG quality should I use?

85 to 92% for anything you will look at closely or print; 75 to 82% for web images where size matters; lower only to hit a hard limit. Above 92% the file grows quickly with no visible gain.

Does compressing a JPEG again make it worse?

Yes, slightly, each time it is decoded and re-encoded; this is generation loss. One or two re-saves at high quality are harmless; ten re-saves at 70% are not. Work from the original when you can.

Is PNG always lossless?

The format is lossless, but tools that convert a photo to PNG-8 quantise it to 256 colours first, which is a lossy step. A 24-bit PNG (the default) is exactly lossless.

Can I make a PNG smaller without losing quality?

Yes: remove metadata, use a higher compression effort (PNG "level 9" or tools such as oxipng), or switch to lossless WebP, which is about a quarter smaller than PNG with identical pixels.