How to Compress Images Without Losing Quality
This is one of those searches where the honest answer starts by splitting the question. "Without losing quality" can mean *without losing a single pixel of data*, which is possible and limits your options, or *without a difference anyone can see*, which is possible far more often and is what most people actually want.
Both are covered below, with the thresholds per image type — because a photograph and a screenshot behave so differently that a single recommendation would be wrong for one of them.
Three things "without losing quality" can mean
Being precise here is what makes the rest of the advice usable.
Mathematically lossless. Every pixel comes back identical. Available from PNG, WebP's lossless mode, and AVIF's lossless mode. The saving is limited to whatever redundancy exists in the image, so a screenshot compresses well and a photograph barely does.
Visually lossless. Data is genuinely discarded, but the difference is imperceptible in normal viewing. This is what a high-quality JPEG or WebP gives you, and it is the right target for almost all photographic work — the savings are enormous compared with lossless, and nobody can tell.
Smaller with no downside at all. Also real, and usually ignored: fewer pixels than you were displaying, metadata you did not need, and a more efficient encoder for the same picture. None of these costs visible quality because none of them changes what the viewer sees.
The trap is asking for the first when you want the second. Insisting on mathematical losslessness for a photograph on a web page means a file several times larger than necessary, for a difference no visitor could detect on any screen they own.
The genuinely lossless route
If you need every pixel intact — a master copy, a medical or legal image, artwork mid-project, anything to be edited again — you have three real options.
WebP lossless. The most useful of the three, and underused. Google's published figures put WebP lossless at 26% smaller than PNG, with transparency costing "just 22% additional bytes". Converting a PNG to WebP lossless is a free 26% with no pixel changed at all. Every current browser reads it, and the format comparison covers where each of the three still wins.
PNG, optimised. Already lossless. What remains is reducing the colour palette where the image genuinely has few colours — an 8-bit PNG of a two-colour logo is a fraction of the 24-bit version, and identical to look at. Dedicated PNG optimisers squeeze further by tuning filter strategies.
AVIF lossless. Smaller again in principle, though support for encoding it in a browser is less consistent, which is why the compressor checks at load time whether your browser can actually produce it rather than offering an option that will fail.
What lossless cannot do is make a photograph small. There is no redundancy to exploit in a picture of grass, so a lossless photograph stays several megabytes. If that is your situation, you want the next section.
Where the visually lossless thresholds are
These are perceptual guidelines from practical use rather than figures from a specification — your own eyes on your own images are the real test, which is what the before/after slider is for. But they are a reliable starting point.
| Quality | What you get |
|---|---|
| 100% | Wasteful. Substantially larger than 95% for no visible gain |
| 95% | Archival. Use when the file may be edited or printed |
| 85–90% | Visually lossless for practical purposes. Safe for client delivery |
| 80% | The web sweet spot. Artifacts exist but need a hard side-by-side look |
| 70% | Acceptable for thumbnails and secondary images |
| 60% | Artifacts become findable without trying — skies, gradients, flat colour |
| Below 50% | Visible damage |
The curve is the important part: between 100% and 85% the file shrinks a great deal and the picture does not change much, and below about 70% the file barely shrinks further while the picture degrades quickly. That is why 80% is the default in so many tools, and why the compressor's Web preset sits there.
Test where it hurts, not where it does not. Drag the comparison slider over hair, foliage, fabric texture, or text — the high-frequency detail lossy compression attacks first. A flat wall will look perfect at 40% and tell you nothing.
It depends what kind of image it is
A single recommendation cannot cover these, because they fail in different ways at different settings.
Photographs. The ideal case. WebP or JPEG at 80–85%, resized to the dimensions you display. Expect 60–80% smaller than the camera original with no visible change.
Screenshots and UI captures. The worst case for lossy compression: hard edges and text are exactly the high-frequency content that gets discarded, so text picks up a visible halo at settings a photograph would shrug off. Keep them lossless — WebP lossless is the best answer, and it is where PNG screenshots see their largest wins.
Logos, icons and line art. Lossless, and preferably SVG if you have the vector original, which is both smaller and infinitely scalable. A lossy logo shows coloured fringing around every edge.
Illustrations with flat colour. Lossless, or a reduced palette. Flat areas offer nothing for artifacts to hide behind, so banding appears early.
Images with transparency. WebP handles both lossy and lossless with an alpha channel — Google notes lossy WebP with transparency is typically around three times smaller than PNG. A JPEG cannot carry transparency at all and will fill it with black or white.
Anything to be edited later. Lossless, always, and keep the original. Each lossy save re-quantises an already-quantised image, and the damage accumulates in a way no later step can undo.
The savings that cost nothing
Before touching a quality setting, three reductions have no visual cost whatsoever.
Show fewer pixels. If an image displays at 800 pixels wide and the file is 4000 pixels wide, five sixths of the data is invisible on that page. Resizing to the display size is not a quality compromise — it is removing data that never reached the screen. This is nearly always the largest single saving available, and the sizing guide covers how to work out the number you need, including for high-density displays.
Change format. Same picture, better encoder. WebP against JPEG at equivalent quality is a 25–34% saving by Google's measurement; AVIF further again, at a median 50% against JPEG where WebP manages 30% on MDN's figures.
Remove what is not the image. EXIF blocks, embedded thumbnails and colour profiles are not pixels. On a large photograph they are noise in the numbers; on a small graphic they can be a real proportion of the file, and stripping location data is worth doing on anything public regardless.
Do these three first and many images reach their target before quality enters the conversation at all.
Being honest about what you can promise
A note for anyone delivering images to someone else, because "compressed without losing quality" is a claim people make loosely.
If you used a lossy format at any setting, data was discarded. That is worth saying plainly rather than implying the file is untouched — particularly to a photographer, a designer or a client who may reasonably want the master. "Visually identical at normal viewing size" is both accurate and reassuring; "no quality loss" is neither, if you exported at 80%.
Two practical habits follow. Keep an untouched original of anything that matters, in the format it arrived in. And when a file has already been through compression once, resist re-compressing it — you cannot recover what the first pass removed, and re-encoding usually makes the file larger while preserving the first encoder's artifacts faithfully. The compressor spots that case, keeps your original bytes and marks the row "Already optimised", which is the correct outcome even though it looks like nothing happened.
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 there a way to compress a photo with truly no quality loss?
Yes, but the saving is small. Lossless formats — PNG, WebP lossless, AVIF lossless — reproduce every pixel, and on a photograph there is little redundancy to exploit, so expect modest reductions rather than the 70% a lossy format gives you. Converting a PNG to WebP lossless is the best version of this: 26% smaller by Google's figures, nothing changed.
What is the highest quality setting that still saves space?
95% is genuinely worth using over 100%, which spends a lot of extra bytes on nothing visible. From there, 85–90% is the practical limit of "no one could tell", and 80% is the point most web workflows settle on.
Why do my screenshots look bad after compressing when my photos are fine?
Because lossy compression discards fine high-frequency detail, and text and interface edges are made almost entirely of that. The same setting that is invisible on a landscape puts a halo around every letter in a screenshot. Screenshots want a lossless format — WebP lossless is both lossless and much smaller than PNG.
Does resizing count as losing quality?
It discards pixels, so technically yes — but if the image was larger than the space it is displayed in, those pixels were never visible to the viewer. Resizing to the display size is the least visible way to make a large saving, which is why it should come before any quality reduction.
Can I get quality back from an over-compressed image?
No. Lossy compression is one-way and the discarded detail is gone. Upscalers and AI enhancement invent plausible replacement detail rather than recovering the original, which is fine for some purposes and not honest to describe as restoration. Re-export from your source instead.
The short version
Decide which promise you actually need. Mathematically lossless means WebP lossless or PNG, and it works well for screenshots and graphics while barely helping photographs. Visually lossless means 80–85% in a lossy format, which is the right answer for nearly all photographic work. And before either, take the three savings that cost nothing at all: display-size dimensions, an efficient format, and no metadata you do not need.
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
WebP has a lossless mode, which is the one genuine way to shrink a PNG without touching a pixel.
Image Metadata Remover
View and remove EXIF, GPS, and hidden data from images
Removes bytes that are not image data at all, so it cannot cost you any quality.
Image Cropper
Crop and resize images with custom aspect ratios
Removing pixels you were not showing is lossless as far as the visible picture is concerned.
Image Batch Resizer
Resize multiple images at once online for free
Resizing does lose data, but far less visibly than the quality slider at the same saving.
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.
What Is the Difference Between Lossy and Lossless Compression?
Lossless keeps every pixel; lossy discards what you cannot see. What each one actually promises, why lossless is not "better quality", and which to pick.
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.
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.
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.
What Is a HEIC File?
HEIC is the photo format every iPhone has defaulted to since 2017. What it actually stores, why so little non-Apple software opens it, and what to do about it.
Sources
- WebP: A new image format for the Web
Google · Official documentation · accessed 7 September 2026
Cited for: WebP lossless 26% smaller than PNG, transparency costing 22% additional bytes, and lossy WebP with alpha around 3× smaller than PNG
- Image file type and format guide
MDN Web Docs · Technical documentation · accessed 7 September 2026
Cited for: Which formats offer lossless modes, the recommendation to use a lossless format for screenshots, and AVIF's median 50% versus WebP's 30%
- Portable Network Graphics (PNG) Specification (Third Edition)
W3C · Standards organisation · published 24 June 2025 · accessed 7 September 2026
Cited for: PNG compression preserving all information, which is the baseline the lossless options are measured against
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