Everyday Tools

Image Compressor

Image compressor for JPG, PNG and WebP files that runs in your browser: set the quality, cap the width or height, and change the format.

Upload Images
Drag & drop images here
or click to choose one or more images
PNG, JPG, JPEG, WebP · Max 10 MB each
Compression Settings

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

  1. 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.
  2. Set Quality with the slider, from 1 to 100. It starts at 80.
  3. To make the images smaller in pixels too, type a Max Width or Max Height. Leave both empty to keep the original dimensions.
  4. Choose the Output Format: JPEG (the default), PNG or WebP.
  5. 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 formatQuality sliderTransparencyGood for
JPEGAppliesNo, turns blackPhotos
PNGIgnored (lossless)YesScreenshots, flat graphics, text
WebPAppliesYesPhotos 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.

Frequently Asked Questions

What formats are supported?
JPEG, PNG and WebP, both in and out. Every file is saved in the format picked under Output Format, JPEG by default, so you can also use the tool to turn a PNG into a JPEG or WebP. GIF, HEIC, AVIF and other formats are not accepted.
Is there a limit on file size?
Yes. The image compressor accepts files of up to 10 MB each, and a larger file is skipped when you add it, with a note that names it. You can add several images at once and compress them in one go, and each result gets its own download button.
Why is my compressed PNG bigger than the original?
PNG output is lossless, so the quality slider has no effect on it, and the browser's PNG encoder may pack the pixels less tightly than the program that made the original. To shrink a PNG, lower Max Width or Max Height, or switch the output to WebP, which keeps transparency and does use the quality setting.
Why did the transparent background turn black?
JPEG has no transparency, and the output format is JPEG by default. When the canvas saves a transparent image as JPEG, the see-through areas come out black. Choose PNG or WebP under Output Format and compress again to keep the transparent background.
What quality setting should I use?
The default of 80 is a reasonable start for photos. Compress once, compare the Original and Compressed previews on the card, and lower the value in steps of 10 until you can see blur or blocky edges, then go back one step. Text and screenshots show artefacts sooner than photos.
Does the image compressor remove EXIF and location data?
Yes. Each image is redrawn on a canvas and saved as a new file, and only the pixels are copied across. Camera model, date taken, GPS coordinates and other metadata in the original are not included in the compressed file.