This image compressor re-encodes JPG, PNG and WebP files at the quality you choose and can scale them down at the same time. It uses the Canvas API in your browser, so the original files never leave your computer, and you can compress several images in one go.
How to use the image compressor
- Drag images onto the Upload Images box, or click it to browse. PNG, JPG, JPEG and WebP files of up to 10 MB each appear in a list with a thumbnail, the file size and the pixel dimensions. Larger files and other formats are skipped, and a note above the list names them.
- Set Quality with the slider, from 1 to 100. It starts at 80.
- To make the images smaller in pixels too, type a Max Width or Max Height. Leave both empty to keep the original dimensions.
- Choose the Output Format: JPEG (the default), PNG or WebP.
- Click Compress All Images. Each file gets a card with the original and compressed previews, both sizes and dimensions, and the percentage saved, plus a Download button that saves it as name-compressed.jpg (or .png, .webp). A summary at the top adds up the totals.
Images you add stay in the list. Remove one with the X button next to it, or click Clear all to start over. Change the settings and click Compress All Images again to redo every file with the new values.
What each setting does
Quality only affects JPEG and WebP output. PNG is lossless, so the slider does nothing for it, and a PNG output can end up larger than the original. Choosing a different output format also converts the file, so the same page turns a PNG screenshot into a JPEG or a WebP.
Max Width and Max Height only ever shrink an image, and the aspect ratio is kept. A 4032×3024 phone photo with Max Width 1600 comes out at 1600×1200. Add Max Height 1000 as well and it becomes 1333×1000, because the image has to fit inside both limits.
The image compressor redraws each image on a canvas and saves a new file, so camera details, GPS location and other metadata are dropped. JPEG output turns transparent areas black, so pick PNG or WebP for logos and icons with a transparent background.
The "under 200 KB" benchmark
I always aim to keep hero images under 200 KB. That is my own rule of thumb: the hero image is often the element Largest Contentful Paint measures, and Google's web.dev rates LCP as good at 2.5 seconds or less.
There is no target-size box, so to compress images to 200KB, work in steps. Start with Max Width at the largest size the image is shown on your site (a hero shown 1600 pixels wide does not need the 4032 pixels of a 12-megapixel phone photo), keep Quality at 80 and compress. If the card still shows more than 200 KB, lower the quality by 10 and run it again. The same steps work for 100 KB or 1 MB limits on upload forms. How to compress any image to under 200KB walks through it with more detail.
Image compression formats compared
| Output format | Quality slider | Transparency | Good for |
|---|---|---|---|
| JPEG | Applies | No, turns black | Photos |
| PNG | Ignored (lossless) | Yes | Screenshots, flat graphics, text |
| WebP | Applies | Yes | Photos and graphics on the web |
The card shows the saving as a percentage of the original file size. A 2.4 MB original saved at 312 KB reads 87.3% saved, and a result larger than the original is labelled as larger instead. How to compress images without losing quality explains how far you can push the slider before artefacts show.
No server-side storage
Your photos stay private. The original file never leaves your computer, and the image compressor works offline once the page has loaded. As a photo compressor for phone pictures it takes JPG files directly; iPhone HEIC photos need converting first with the HEIC to JPG converter. To resize to exact dimensions or crop to a social media size, use the image resizer, and more file tools are under developer tools.