Z

Image Compressor

Shrink JPG, PNG and WebP file sizes in your browser without uploading. Adjust quality and download instantly.

Runs in your browser — files never leave your device

How it works

Drop in a JPG, PNG, or WebP image and it is re-encoded directly in your browser using the open-source browser-image-compression library. The work runs in a Web Worker — a background thread — so the page stays responsive while the image is decoded, redrawn, and saved again at the quality you choose. The original and compressed sizes appear side by side with the percentage saved, and every time you release the quality slider the compression re-runs so you can see the trade-off immediately.

Two guardrails shape the output. Images longer than 4,096 pixels on their longest side are scaled down to 4,096 pixels, which keeps memory use reasonable and is still larger than a 4K display. And the encoder makes up to ten passes to bring the result under a 10 MB ceiling. The output keeps the input format and downloads with a compressed- prefix on the original filename.

The default quality of 70% is a sensible starting point for photos: a 4.2 MB smartphone JPG typically lands somewhere around 1 MB at that setting, and savings of 60–80% are common for camera photos. The exact result depends entirely on the image — detailed textures compress less than smooth areas — so treat those figures as typical, not guaranteed.

Format matters more than most people expect. JPG and WebP are lossy, so the quality slider has a large effect on them. PNG is lossless: the slider does little for PNG files, and real savings only appear when the image is big enough to hit the 4,096-pixel cap. As a rule, screenshots and graphics with text belong in PNG, while photographs compress far better as JPG or WebP.

Because the pipeline redraws the image, EXIF metadata — camera model, capture date, GPS location — is not carried into the output, though the orientation flag is applied first so photos shot in portrait stay upright. Smaller files, and one less way to leak where a photo was taken.

Frequently asked questions

Which image formats are supported?
JPG, PNG, and WebP. The output keeps the input format — a JPG stays a JPG, a PNG stays a PNG — so you never get a surprise conversion. JPG and WebP respond most strongly to the quality slider because they are lossy formats.
What does the quality slider actually do?
It sets the encoder quality for the re-encode, from 10% to 100% in 5% steps. 70% is a good default for photos; below about 50% you will start to see artifacts around sharp edges and in smooth gradients like skies. Compression re-runs each time you release the slider, so comparing settings takes seconds.
Why did my PNG barely shrink?
PNG is a lossless format, so the quality slider has little effect on it. A PNG only gets meaningfully smaller here when its longest side exceeds 4,096 pixels and it is scaled down. If your PNG is actually a photograph, saving it as JPG or WebP will cut far more than recompressing the PNG ever can.
Does compression change my image’s dimensions?
Only if the longest side exceeds 4,096 pixels — then the image is scaled down so that side is 4,096 pixels. Smaller images keep their exact pixel dimensions; only the encoding changes. If you need specific dimensions, use an image resizer first and compress the result.
Is EXIF metadata preserved?
No. Re-encoding through a canvas drops EXIF data such as camera model, capture date, and GPS coordinates. The orientation flag is read and applied before encoding, so portrait photos stay upright. Losing embedded GPS data is usually a plus when you are about to share a photo publicly.
How large an image can I compress?
The encoder targets a maximum output of 10 MB and makes up to ten passes to get under it. Input size is limited only by your device’s memory, because the whole image is decoded locally — a very large PNG on a low-memory phone may be slow or fail, while typical camera photos compress in a second or two.
Are my images uploaded to a server?
No. Compression runs entirely in your browser inside a Web Worker — the file is never transmitted anywhere, and the tool keeps working even if you disconnect after the page loads. That makes it safe for private photos, scanned IDs, and unreleased design assets.