Compress Image re-encodes your photos at the quality you choose and shows you the result honestly: the original size, the new size, and the percentage you actually gained. Drop a batch of JPG, PNG or WebP files, move the quality slider, and download them individually or together as a .zip. Everything runs inside your browser through the Canvas API, so no image is ever uploaded. When a file is already so well compressed that re-encoding it would make it bigger, the tool says so and keeps your original rather than handing back a worse file.
How to compress an image
- 1 Drop your JPG, PNG or WebP files onto the area above — several at once is fine.
- 2 Pick a quality. Around 75 is the sweet spot for photographs.
- 3 Optionally convert to WebP or cap the longest side, which is where the big savings usually come from.
- 4 Press Compress, check the before/after on each card, then download individually or as a .zip.
How compression works in your browser
Each file is decoded into an ImageBitmap, which is the browser's own image decoder working off the main thread. The bitmap is drawn onto a canvas at the size you asked for — the same size by default, or scaled down if you capped the longest side — with high-quality smoothing enabled so a downscale does not come out crunchy.
The canvas is then encoded with the native HTMLCanvasElement.toBlob(), passing your quality value. This hands the work to the browser's built-in JPEG or WebP encoder, the same one used by every other application on your system, and calls back with the finished bytes. Images are processed one at a time and the tool yields a frame between them, which is what keeps the page responsive and the progress bar honest when you drop thirty photos at once.
The result is compared against the original. If it is smaller, you get a download button and a percentage; if it is not, and the format did not change, the original is kept instead. Every download goes through a temporary blob URL that is revoked straight afterwards, so a long batch does not quietly hold hundreds of megabytes in the tab.
When this is the right tool
Getting under an upload limit
Government forms, job portals and school systems routinely cap attachments at 2 MB while phones produce 8 MB photos. Quality 70 with the longest side capped at 1920 px clears that limit almost every time.
Images for a website
Page weight is mostly images. Converting a set of JPGs to WebP at quality 75 typically halves the total again on top of the compression itself, which is the cheapest performance win available.
Email attachments that keep bouncing
Ten holiday photos straight off a phone are easily 80 MB and will be rejected by most mail servers. The same ten at quality 75 fit comfortably, and nobody looking at them on a screen can tell.
Stripping location data by accident
Because compression redraws the pixels, EXIF — including GPS coordinates — does not survive. Compressing a photo before posting it publicly is a convenient way to remove where it was taken.
Why compress images at all
Image weight is the single biggest cause of slow web pages, of email attachments that bounce, and of upload forms that reject a perfectly ordinary phone photo. A modern phone camera produces files of five to twelve megabytes, and almost none of that is visible detail once the picture is on a screen. Compressing to around 75% quality typically removes two thirds of the file with no difference anyone can see. Doing it locally matters because the photos worth compressing are usually personal ones.
What it cannot do
Running in a browser sets the boundaries here:
- It cannot beat a dedicated encoder. Tools like MozJPEG or a full WebP encoder squeeze out a few more percent at the same visual quality; this uses the browser's built-in encoder, which is fast and universal rather than record-breaking.
- It cannot losslessly optimise a PNG. Removing chunks and re-deflating a PNG the way pngcrush does is not something the Canvas API exposes, so a PNG kept as PNG will rarely shrink.
- It does not support HEIC, AVIF input or animated GIFs. Browsers decode what they decode; an animated file would come back as a single frame, so those formats are refused rather than silently flattened.
- Very large images are bounded by canvas limits. A photo beyond roughly 100 megapixels may fail to draw at all, and several such files at once can exhaust the tab.
- All metadata is lost, not selectively. There is no option to keep the copyright field while dropping the GPS one — the canvas carries pixels only.
Troubleshooting
- The card says "already optimised"
- The re-encode came out no smaller than the original, so your file was kept. That is normal for screenshots, logos and images that have already been through a compressor. If you need it smaller, switch the format to WebP or reduce the longest side.
- The image looks soft or blocky
- The quality is too low for this picture. Fine texture, skin tones and gradients suffer first. Raise the slider ten points and compare — the file will still be far smaller than the original.
- Nothing happens with my HEIC photos
- iPhone HEIC files are not supported because most browsers cannot decode them. On the phone, set Camera → Formats to "Most Compatible" to get JPGs, or export a copy as JPG first.
Frequently asked questions
What quality should I choose?
For photographs, 70 to 80 is the range where the file gets dramatically smaller and the loss stays invisible at normal viewing size. Below 50 you will start to see blocking in skies and smooth gradients. Above 90 you pay a lot of bytes for detail nobody will notice.
Why did my PNG get bigger instead of smaller?
PNG is lossless, so re-encoding it cannot invent a saving — and screenshots or logos with flat colour are already close to optimal. The tool detects this, keeps your original file and labels the card "already optimised". To genuinely shrink a photographic PNG, convert it to WebP or JPG with the format control.
Are my images uploaded?
No. Compression happens in your browser with the Canvas API. You can verify it by opening the Network tab of your developer tools while compressing, or simply by disconnecting from the internet after the page has loaded — everything still works.
Is the compression lossy?
For JPG and WebP, yes — that is how they achieve their size. The encoder discards detail your eye is least sensitive to. PNG output stays lossless, which is why the quality slider does not apply to it.
Does compressing remove EXIF data?
Yes. Redrawing the image onto a canvas keeps only the pixels, so camera model, timestamp and GPS location are all dropped. That is usually a privacy improvement, but if you need the metadata, keep a copy of the original.