What Is the Difference Between Lossy and Lossless Compression?
The two families of compression make different promises. Lossless promises that what comes out is bit-for-bit what went in. Lossy promises only that it will look close, and buys much smaller files with the difference.
That distinction is simple. The confusions that grow out of it are not, and four of them cost people real time — the belief that lossless means higher quality, that lossy means damaged, that converting one to the other undoes anything, and that lossless is always the smaller of two options.
What each one promises
Lossless guarantees reversibility. Compress and decompress, and you have the identical file — every pixel, exactly. This is the same guarantee a ZIP archive makes about a document, and the reason you can trust it for a master copy. The W3C specification for PNG puts the principle plainly: its filtering and compression "preserve all information".
Lossy guarantees nothing about the data and everything about the appearance. It discards information permanently, selected specifically because human vision is bad at noticing its absence, and the amount discarded is what a quality setting controls.
| Lossless | Lossy | |
|---|---|---|
| Original recoverable | Yes, exactly | No, ever |
| Typical saving on a photo | Modest | 80–95% |
| Typical saving on a screenshot | Large | Large, but with visible damage |
| Repeated saving | Harmless | Accumulates damage |
| Formats | PNG, WebP lossless, AVIF lossless | JPEG, WebP lossy, AVIF lossy |
| Transparency | PNG, WebP, AVIF | WebP, AVIF (not JPEG) |
Note the asymmetry in the middle rows, because it is the whole practical story: lossless is excellent for the images lossy compression handles badly, and nearly useless for the images lossy compression handles brilliantly.
Four things people get wrong
"Lossless is higher quality." No — for the same source, lossless and a high-quality lossy export look the same on a screen. Lossless is not a quality tier; it is a guarantee about the data. Saving a photograph as PNG does not improve it. It preserves it, at roughly ten times the size, with no visible benefit at normal viewing.
"Lossy means bad." An 80%-quality photograph is what almost every image you have ever seen on the web is, including the ones you thought looked excellent. The detail is genuinely gone; you cannot see that it is gone. Refusing lossy compression for web photography means shipping files ten times larger for a difference nobody perceives.
"I can convert lossy to lossless to fix it." The most expensive misconception, because it feels productive. Converting a JPEG to PNG gives you a lossless copy of a lossy image — the discarded detail is not in the file to recover. You get a much bigger file containing exactly the same visible picture, artifacts included.
"Lossless is always smaller than the original." Not necessarily. Lossless compression finds redundancy, and if there is none, the output can be marginally larger than the input plus its overhead. This is also why re-compressing an already-optimised image tends to grow it: the previous encoder's artifacts are themselves detail the new encoder must preserve. ToolForge's compressor watches for exactly this and keeps your original bytes, marking the file "Already optimised" rather than handing back something worse and bigger.
Which to choose
The decision follows from what the image is made of, not from how much you care about it.
Choose lossless when the image has large flat areas, hard edges or few distinct colours — screenshots, diagrams, logos, line art, charts, pixel art. Also whenever the file is a master you will edit again, or when it must survive multiple save cycles, or when an exact reproduction is a requirement rather than a preference.
Choose lossy for photographs and any continuous-tone image with fine detail throughout, which is where the savings are dramatic and the cost invisible. That covers essentially all photographic work destined for a screen — and the mechanism explains why: what gets discarded is chosen specifically to be hard for you to see.
The awkward middle case is a screenshot that contains a photograph, or a product shot on a flat white background. Try both; the file sizes will usually make the decision obvious, and if lossy wins on size, check the edges of the text before accepting it.
One more option that neither family covers: for logos and icons, the best answer is often not a raster format at all. SVG stores shapes rather than pixels, so it is sharp at any size and typically smaller than either.
The distinction is blurrier than it used to be
Two modern developments complicate the neat split.
Formats do both. WebP and AVIF each have a lossy and a lossless mode, so "is this a lossy format?" is no longer answerable from the extension alone — it depends how the file was written. WebP lossless is the most useful example: it competes directly with PNG and Google measures it 26% smaller, while WebP lossy competes with JPEG at 25–34% smaller. One format, both jobs.
"Visually lossless" is a real and useful category. It means lossy compression tuned so the difference is imperceptible in normal viewing — data lost, appearance preserved. Most professional image delivery lives here. It is worth using the phrase precisely, because telling a client an image is "not compressed" when you exported at 85% is inaccurate, while "visually identical at viewing size" is both true and reassuring.
If you ever need to prove a round trip was genuinely lossless rather than merely convincing, compare checksums: hash the original and the decompressed result, and identical hashes settle it. Different hashes with an identical-looking image is the signature of visually lossless compression.
Where the analogy with audio and archives helps
The same split exists elsewhere, and borrowing the intuition is useful.
Audio. FLAC is lossless, MP3 and AAC are lossy. Nobody thinks a FLAC file "sounds better than" a 320 kbps MP3 in casual listening — they think it is the archival copy. That is exactly the right relationship between PNG and a high-quality JPEG.
Archives. ZIP is lossless because it must be: a document with a few bytes discarded is corrupt, not slightly worse. Which is the useful test for your own images — ask whether an approximation is acceptable. For a photograph on a page, it plainly is. For a scanned contract, a barcode, a QR code or a medical image, it plainly is not, and lossy compression can make those unreadable rather than merely uglier.
The general rule: lossy compression is appropriate when the output is for human eyes, and inappropriate when something is going to be read — by a scanner, a decoder, or a court.
Image Compressor
Compress JPG, PNG, WebP by quality or target file size. It runs in your browser, so the files never leave your machine, and there is nothing to install or sign up for.
Try the Image CompressorFrequently asked questions
Is JPEG always lossy?
In every practical sense, yes. The standard does define a lossless mode, but it is essentially unused and unsupported by ordinary software, so a JPEG you encounter in the wild is lossy. If you need a lossless file, use PNG or WebP lossless rather than hunting for a lossless JPEG encoder.
Which image formats are lossless?
PNG always, plus the lossless modes of WebP and AVIF. GIF is technically lossless but limits every image to a palette of at most 256 colours, which loses colour information before compression even starts — lossless about the wrong thing.
Does saving a JPEG repeatedly damage it?
Yes, gradually. Each save re-quantises an image that has already been quantised, so artifacts compound. One extra round trip at high quality is close to harmless; editing and re-saving the same JPEG a dozen times is visibly destructive. Keep a lossless master and export from it.
Why is my PNG bigger than the JPEG it came from?
Because lossless compression cannot exploit a photograph. It faithfully stores every pixel, including the artifacts the JPEG introduced, and photographs contain almost no redundancy to compress. Expect a lossless photograph to be several times a good lossy one — that is the format working correctly.
Is lossless compression worth using at all for photos?
For masters and originals, absolutely — that is what they are for. For delivery to a screen, rarely: you pay several times the bytes for a difference nobody can perceive. Keep the lossless original, ship a visually lossless export.
The short version
Lossless is a guarantee about data, not a quality tier: it keeps every pixel and only helps images that contain repetition. Lossy is a bargain that trades invisible detail for enormous savings, which is why nearly every photograph you see online is one. Match the family to the content — flat colour and hard edges lossless, continuous tone lossy — keep a lossless master of anything that matters, and never expect a conversion to recover what an earlier save discarded.
Tools that go with this
Each one is here for a specific reason rather than because it is in the same category.
Image Format Converter
Convert between JPG, PNG, WebP, AVIF, and HEIC
Where you switch between a lossy and a lossless format, which is the decision this article is about.
Image Metadata Remover
View and remove EXIF, GPS, and hidden data from images
A reduction that is lossless by definition, because metadata is not part of the picture.
File Hash Checker
Calculate and verify SHA-256, SHA-512 file checksums
Settles the question empirically: identical hashes mean a round trip really was lossless.
Image Batch Resizer
Resize multiple images at once online for free
For the third option the two families both miss — fewer pixels rather than cleverer encoding.
Related articles
How Image Compression Works
Why a photo can lose 80% of its bytes and look identical: what lossy compression discards, how quality settings behave, and why PNG ignores them entirely.
JPG vs PNG vs WebP: Which Should You Use?
A decision table plus the published figures: WebP is 25–34% smaller than JPEG and 26% smaller than PNG. When each format still wins, and where AVIF fits.
How to Compress Images Without Losing Quality
Truly lossless compression, and visually lossless compression, are different things. Which to use per image type, and where the quality thresholds actually sit.
How to Compress an Image
Compress JPG, PNG or WebP files in your browser: which preset to use, when to set a target size in KB, and the order of operations that saves the most.
Why Your Image Is Still Too Large After Compressing
Six reasons compression did not shrink your file: a PNG that stayed a PNG, dimensions rather than quality, an already-optimised source, or a lying upload limit.
Image Optimization Best Practices
The nine things that actually make images fast, in order of impact — right dimensions, right format, lazy loading everything except the one image you must not.
What Image Size Should You Use on a Website?
Pixel dimensions, file size and DPI are three different things, and only two of them matter on the web. The sizes to use, and why 300 DPI is meaningless here.
CR3 vs JPG: What Is the Difference?
CR3 keeps your sensor data, JPG keeps a finished picture. What each one costs you in card space, editing freedom and compatibility, and when to shoot which.
Sources
- Portable Network Graphics (PNG) Specification (Third Edition)
W3C · Standards organisation · published 24 June 2025 · accessed 7 September 2026
Cited for: PNG's filtering and compression preserving all information — the definition of the lossless guarantee used here
- WebP: A new image format for the Web
Google · Official documentation · accessed 7 September 2026
Cited for: WebP having both modes, at 26% smaller than PNG losslessly and 25–34% smaller than JPEG lossily
- Image file type and format guide
MDN Web Docs · Technical documentation · accessed 7 September 2026
Cited for: Which formats are lossy or lossless, and GIF's palette limit of at most 256 colours
About the author
Builder and maintainer, ToolForge
Started ToolForge in May 2026 and has built and maintained it since, writing every tool on the site and the documentation that goes with each one.
Part of
Image Compression & FormatsWhy lossy compression works, which format to use, what image size a web page actually needs, and why a file is still too big after compressing it.
Browse all image tools