Skip to content

Compress images online

Shrink JPG, PNG and WebP files by quality or to an exact target size in KB. Side-by-side comparison slider and batch savings, all in your browser.

  • Runs in your browser
  • Files are never uploaded
  • Free, no account
Drop images here to compressJPG, PNG, WebP or AVIF — compression runs on your device.JPG, JPEG, PNG, WEBP, AVIF, GIF, BMP, SVG · up to 200 MB each

How to compress an image

  1. Drop in one or more photos. Nothing is uploaded — the encoder runs on your own CPU.
  2. Pick a mode. By quality gives you a familiar 1–100 dial. By target file size lets you say “200 KB” and have the tool work out the quality for you.
  3. Optionally cap the width. For anything headed to a web page this is usually the single biggest saving.
  4. Press Compress, then drag the divider in the before/after view to check the result at full size before you download.

How the target-size search works

There is no formula that converts “quality 74” into “183 KB” — it depends entirely on the content of the image. Flat graphics compress enormously; foliage, water and film grain barely compress at all. So the tool measures instead of guessing. It encodes at full quality first; if that already fits, it stops. Otherwise it runs a binary search: encode at the midpoint of the range, keep the result if it fits and raise the floor, otherwise lower the ceiling. Ten rounds narrow the quality range to about a tenth of a percent, which is far finer than the eye can distinguish, and the highest passing result is the one you get.

For PNG there is no quality parameter to search, because PNG is lossless. In target-size mode the search runs on the scale factor instead, shrinking the pixel dimensions until the file fits. For photographs you will almost always get a better-looking result by switching the output format to JPEG or WebP.

Quality settings, and what they actually cost

QualityTypical size vs originalWhat you see
95–10060–90%Visually lossless; wasteful for the web
85–9425–45%No visible artefacts even when pixel-peeping
75–8412–25%The web sweet spot — indistinguishable at normal size
60–748–15%Slight softening in fine texture; fine for thumbnails
40–595–10%Visible ringing on hard edges, banding in skies
Below 403–6%Obvious 8 × 8 blocking; only for placeholders

Choosing a format

FormatBest forTransparencyRelative size
JPEGPhotographs, anything with smooth gradientsNoBaseline
WebPAlmost everything on the modern webYes25–35% smaller than JPEG
PNGScreenshots, logos, flat colour, sharp textYesMuch larger for photos
AVIFMaximum compression when encode time is freeYesUp to 50% smaller than JPEG

Getting the most out of a photo budget

  • Resize before you compress. A 4000 px photo displayed in a 800 px column is carrying 25× more pixels than it needs. Cap the width first; the quality dial then has far less work to do.
  • Strip the metadata. EXIF blocks, embedded colour profiles and camera thumbnails can add 20–80 KB to every file. The EXIF remover clears them, and this tool drops them too as a side effect of re-encoding.
  • Judge at 100%. The comparison slider shows both images at the same on-screen size. Zoom the page to 100% before deciding whether an artefact matters.
  • Never re-compress a re-compressed file. Each JPEG generation compounds the previous one’s errors. Always start from the highest-quality original you have.

Repeated compression and why it degrades

JPEG works by splitting the image into 8 × 8 blocks, converting each to frequency coefficients and quantising them. Decoding and re-encoding re-quantises coefficients that were already rounded, so errors accumulate: edges gain halos, flat areas develop blotches, and colour bleeds across block boundaries. Saving the same JPEG ten times at quality 80 looks dramatically worse than saving the original once at quality 40. Keep your originals.

Questions

How does "target file size" work?

The tool encodes your image up to ten times, halving the search range each round, until it finds the highest quality that still fits under the limit you set. That is a binary search on the quality parameter, and it usually lands within a few percent of your target.

Why does the PNG barely shrink?

PNG is lossless, so there is no quality dial to turn — the only lever is pixel count. For photographs, switch the output format to JPEG or WebP and you will typically see an 80–95% reduction. For screenshots and flat graphics, PNG is already the right choice.

What quality setting should I use?

For photographs on the web, 75–85 is the usual sweet spot: the file is a fraction of the original and the difference is invisible at normal viewing size. Below 50 you start to see blocking around hard edges and banding in skies.

Is WebP really smaller than JPEG?

For the same visual quality, WebP files are typically 25–35% smaller than JPEG. Every current browser supports it. Keep a JPEG copy only if the file has to work in very old software.

Are my photos uploaded anywhere?

No. The encoder runs inside this page using your device’s own CPU. You can put the browser into airplane mode and the tool still works — that is the simplest proof that nothing is being sent.