Image Compressor

Compress JPG, PNG and WebP images with a quality slider and optional downscaling, with before and after sizes.

  • Runs in your browser
  • Free, no sign-up

Drop images here or click to choose

JPEG, PNG, WebP ยท any file size

Processed in your browser. Files are not uploaded.

Files are processed on your device and never uploaded. Very large files depend on your device memory.

What does Image Compressor do?

Compress JPG, PNG and WebP images in your browser. Set quality, cap the longest side, compare before and after and download all as a ZIP. No uploads.

Price
Free
Account
Not required
Processing
Entirely in your browser; your data and files are not uploaded
Works on
Any modern browser on desktop, tablet or phone
Category
Image Tools

How to use the image compressor

  1. Drop images onto the drop zone or click to choose them (JPG, PNG or WebP, up to 100 at once).
  2. Choose the output format. "Keep format" keeps JPEG and WebP, and turns PNG into WebP because PNG has no quality setting.
  3. Compress by quality (80 is a good balance for photos, 85 to 92 for images with text) or by a target file size in KB.
  4. Optionally limit the longest side, for example to 2000 pixels, which often saves more than lowering quality.
  5. Click Compress, compare with the slider, and download files one by one or as a ZIP.

Worked example

A 4000 x 3000 phone photo for a website

Limiting the longest side to 2000 pixels makes it 2000 x 1500, a quarter of the pixels, before quality is applied. The tool then shows the exact before and after size and an SSIM similarity score for each file. With a 300 KB target, it tries qualities by binary search and keeps the highest one whose file fits. If a re-encoded file that was not resized ends up larger than the original, the original is kept.

How it works

Each image is decoded by the browser (phone photos are turned upright using their EXIF orientation) and optionally reduced. Resizing uses a separable Lanczos3 filter for reductions (bicubic Catmull-Rom for enlargements), computed in premultiplied alpha so transparent edges do not get dark fringes, and runs in a background worker so the page stays responsive. Reduced images get subtle luminance sharpening (unsharp mask, radius 0.6 px, amount 35%) unless you turn it off. The image is then encoded with the browser's JPEG or WebP encoder. In target size mode the quality is found by binary search between 10 and 95 (at most 9 encodes), keeping only a result that was measured to fit. SSIM is computed on luminance over 8 x 8 pixel windows at full resolution (sampled evenly across very large images), comparing the output with the uncompressed image. Transparent pixels are filled with white only when saving as JPEG.

Assumptions

  • Quality numbers are not comparable between browsers or between JPEG and WebP; judge the result visually.
  • Re-encoding removes EXIF metadata, including camera details and GPS location.

Frequently asked questions

Are my files uploaded?

No. Images are processed in your browser on your own device and are never sent to our server. The page keeps working if you go offline after it loads.

Is compression lossless?

No. JPEG and WebP compression here is lossy: some detail is discarded to make files smaller. Use the comparison slider to check that the result looks right, and keep your originals.

Why is my compressed image larger?

Images that are already well compressed, or small graphics, can grow when re-encoded. With "Keep the original if it is already smaller" on (the default), the original file is used unchanged whenever the new file is not smaller and the image was not resized. Otherwise the tool warns you.

What happens to transparency?

WebP keeps transparency. JPEG cannot store it, so transparent areas are filled with white and the tool warns you.

Can I compress to a target file size?

Yes. Choose "Target file size" and enter a maximum in KB. The tool searches for the highest quality whose file fits. If even quality 10 is too large, it says so; limiting the longest side is then the way to get smaller.

What does the SSIM number mean?

SSIM (structural similarity) compares the compressed image with the uncompressed one on brightness, contrast and structure. 1 means identical; lower values mean more visible change. It is a guide, so still check detailed areas with the comparison slider at 100%.

Limitations

  • There is no file size limit. Images larger than your browser can draw (about 120 megapixels on computers, 16.7 megapixels on iPhones and iPads) are reduced to the largest size that fits first.
  • Output quality depends on your browser's encoder, so results vary slightly between browsers.
  • Animated GIFs and animated WebP images are not supported.
  • Safari cannot save WebP at the time of writing; choose JPEG there.