Image Compressor

  • Free, no sign-up
  • Runs in your browser
  • Updated
Quick answer. The Image Compressor makes JPG, PNG and WebP files smaller by re-encoding them at a lower quality or a target file size, right in your browser. Nothing is uploaded.

Image Compressor tool

JPG, PNG or WebP. Batch supported.

Output format

Add images to start. Results appear here.

Runs in your browser. Your data never leaves your device.

How to use the Image Compressor

  1. 1Drop one or more images into the box, or click to choose them.
  2. 2Pick a quality level, or switch on target size and enter a size in KB.
  3. 3Compare the original and compressed versions with the slider.
  4. 4Download each image, or download them all as a ZIP file.

What does an image compressor do?

An image compressor makes a picture file smaller so it loads faster, fits email limits and uses less storage. This image compressor re-encodes JPG, PNG and WebP files inside your browser at a quality level or target file size you choose. You see the size before and after, compare the two versions side by side, and download one file or a whole batch as a ZIP.

Your photos are never uploaded. The work is done by your own device using the canvas API and the open-source browser-image-compression library (MIT licence).

How does image compression work?

There are two kinds of compression.

  • Lossy compression (JPG, WebP) throws away detail your eyes are unlikely to notice, such as tiny colour changes in a blue sky. Lower quality means more detail removed and a smaller file.
  • Lossless compression (PNG) keeps every pixel exactly. It only removes repetition in the data, so savings on photos are small.

When you add a file, the tool decodes it into raw pixels, then asks the browser to save those pixels again with canvas.toBlob() at your quality setting. With target size switched on, the library tries lower and lower quality (and, if needed, smaller dimensions) until the file fits under your limit.

The biggest saving usually comes from dimensions, not quality. A 4000 × 3000 phone photo has 12 million pixels. Shown on a website at 1200 pixels wide, most of them are wasted. Setting "Max width or height" to 1600 cuts the pixel count by about 84% before quality is even touched.

Worked example

Say you have a 4032 × 3024 JPG from a phone camera that is 3.8 MB, and a job portal only accepts files under 500 KB.

  1. Drop the photo in. At the default quality of 0.75 it might come out around 1.5 MB, still too big.
  2. Set Max width or height to 1600. The image is now 1600 × 1200 pixels.
  3. Tick Target a maximum file size and enter 450 KB.

The tool reports the exact result, for example "3.8 MB → 420 KB (89% smaller)". Drag the comparison slider across a face or text in the photo to check nothing looks blurry. Your numbers will differ, because detailed photos (grass, crowds) compress less than simple ones (a wall, a sky).

Which format should I choose?

FormatBest forTransparencyTypical result for photos
JPGPhotos, email attachments, formsNoSmall, universally accepted
WebPWebsites and appsYesUsually smaller than JPG at similar quality
PNGScreenshots, logos, text graphicsYesLarge for photos; sharp for flat graphics

Keep the Same option if a website asks for a specific format. Switch PNG photos to JPG or WebP for a large saving. You can also change format separately with the Image Converter.

Tips for the best results

  1. Resize first, then compress. Use the max dimension box here, or the Image Resizer for exact sizes such as 1080 × 1080 for Instagram.
  2. Quality 0.7 to 0.85 is the sweet spot for photos. Below 0.6 you may see blocky areas and colour banding.
  3. Never re-compress the same JPG again and again. Each lossy save loses a little more detail. Keep your original and compress from it.
  4. Check text and faces with the comparison slider. Those show artefacts first.
  5. For YouTube, check the final file against the 2 MB limit with the YouTube Thumbnail Checker.
  6. Need a smaller document instead of a picture? Use Compress PDF.

Limitations

  • Metadata is removed. Re-encoding drops most EXIF data (camera model, date, GPS). That is good for privacy but bad if you need the date taken.
  • Animated GIFs are not supported; only JPG, PNG and WebP are accepted.
  • PNG quality has little effect because PNG is lossless. Choose a different output format to save space.
  • Very large batches use a lot of memory. On older phones, process ten or twenty photos at a time.
  • Results vary by browser. Chrome, Firefox and Safari use different encoders, so the same settings can give slightly different file sizes.

Key terms

  • Quality: a number from 0 to 1 telling the encoder how much detail to keep.
  • Lossy: compression that permanently removes some detail.
  • Lossless: compression that keeps every pixel exactly.
  • Artefacts: visible faults from heavy compression, such as blocks or halos around edges.

Frequently asked questions

How much smaller will my images get?

It depends on the photo. Large phone photos often shrink a lot at quality 0.75 with little visible change. Images that are already compressed, or small PNG icons, may shrink only a little. The tool shows the exact saving for each file.

Does compressing reduce the image dimensions?

Not by default. You can set a maximum width or height to make the image smaller in pixels too, which saves much more space.

Why did my PNG barely shrink?

PNG is lossless, so the quality slider cannot remove detail. Choose WebP or JPG as the output format for big savings on photos.

Are my photos uploaded?

No. Compression runs with the browser-image-compression library inside your browser. Your images never leave your device.

Is the location data in my photo kept?

Re-encoding through the canvas removes most EXIF metadata, including GPS location, which is good for privacy.

Last updated: . Written and tested by Abdul Moid Khan, ATechCraft. Read how we build and test tools.