How to Compress an Image Without Losing Quality
Quality is only one of four things making your file large. Here is what to change first, how far you can push JPEG before artefacts show, and what to never do twice.
Compression is not one dial. A JPEG file is large or small because of four independent things: how many pixels it holds, what the encoder threw away, how noisy the scene is, and what extra data travelled along with the picture. Most people only ever touch the second one, then conclude that compression ruins images.
It does — if you lower quality on a file that was three times larger than it needed to be. Fix the other three first and you can usually cut 80% of the size before the quality slider matters at all.
Pixel count is the biggest lever, and it is not quality
A 12-megapixel phone photo is 4032 × 3024 pixels. Displayed full-width in a browser on a laptop, it occupies about 1440 pixels — a ninth of the pixels it carries. The other eight ninths are downloaded, decoded and then thrown away by the display.
Resizing to the size the image will actually be shown at typically removes 70-90% of the bytes with no perceptual loss at all, because no pixel that reaches your eye was touched. That is why resizing is the correct first move and quality reduction is the fallback.
What each format can actually give you
| Format | Lossy? | Best for | How far you can push it |
|---|---|---|---|
| JPEG | Yes | Photographs | Down to quality 70 with no visible change at 100% |
| PNG | No | Screenshots, flat graphics, transparency | No quality dial — must convert to shrink |
| WebP | Both | Anything going on a web page | 25-35% smaller than JPEG at equal quality |
| HEIC | Yes | iPhone storage | Smallest of all, but almost nothing opens it |
What you are really trading away
JPEG does not store pixels; it stores the average colour of 8 × 8 blocks plus a description of how much each block varies. Lowering quality means describing that variation with fewer numbers. In smooth areas — sky, skin, a painted wall — the loss is invisible because there was almost no variation to describe. At a sharp edge, the block descriptions get rounded off and you see ringing: a faint halo of squares around text and high-contrast lines.
That is why a screenshot degrades at settings where a landscape still looks perfect. Detail is not the problem; the ratio of sharp edges to flat area is.
Three passes that beat lowering quality
- Resize to the display size first. A 4032px photo shown at 1200px keeps 91% of its bytes for pixels nobody sees.
- Convert to WebP if the file is going on a web page. Same visual quality, roughly a third fewer bytes, and every current browser reads it.
- Strip metadata. A phone photo carries an EXIF block, a thumbnail, sometimes a GPS trace and a maker note — a few kilobytes that carry no pixels.
How far is too far
These numbers come from a 12-megapixel photograph with average detail. A photo of a brick wall will be much larger at the same setting; a photo of fog will be much smaller. Size follows content, which is why any tool that promises an exact output size without measuring your file is guessing.
| Quality | Typical size | Verdict |
|---|---|---|
| 90-95 | 2.0-2.6 MB | Indistinguishable from the original. No reason to go higher. |
| 80 | 450-600 KB | The usual sweet spot for photographs shown on a screen. |
| 70 | 250-350 KB | Fine for thumbnails and backgrounds; soft in fine texture. |
| 50 | 120-180 KB | Visible blocking in gradients. Acceptable only at small display sizes. |
| 30 | 60-90 KB | Obvious artefacts. Use only when a hard limit demands it. |
The one thing you should never do twice
JPEG is lossy, and every save is a fresh round of loss from the already-damaged version. Saving at quality 95, reopening, then saving at 80 does not equal saving once at 80 — it is worse, and the artefacts compound where the first pass was weakest.
Keep the original. Compress a copy. If a client asks for a smaller version, encode again from the original, never from the file you already compressed. Ten rounds of “just a bit smaller” will visibly destroy an image that one well-chosen pass would not have touched.
Measure instead of guessing
A tool that shows the output size before you download turns compression from a gamble into a decision. Set a quality, read the number, move the slider, read it again. Two or three tries usually lands within a few kilobytes of a limit you have to hit — which is far more reliable than picking a quality and hoping.
Try it without uploading
Every tool on Toolpix runs in your browser. No file is sent anywhere.
Browse all toolsTOOLS IN THIS GUIDE
Each one does the step described above, on your own device.