Compress Image Online

Make a JPG, PNG or WebP file smaller by re-encoding it at the quality you choose. Everything happens in your browser, and you see the original and the compressed version side by side before you download.

How to compress an image

  1. Click Choose an image, drop a file anywhere on this page, or paste a screenshot with Ctrl+V (⌘V on a Mac).
  2. Check the output format. The tool preselects JPEG for JPEG photos and WebP for everything else, as long as your browser can save WebP.
  3. Set the quality slider. 80 is a sensible starting point for photos that will be shown on a website or sent by email.
  4. Click Compress image. The original and the compressed version appear side by side with their dimensions, file sizes and the percentage saved.
  5. Look closely at detailed areas such as faces, text and skies. If you see blocky patches or smeared edges, raise the quality and compress again; if you cannot see any difference, try a lower value.
  6. Click Download compressed image. The file keeps your original name with “-compressed” added.

What happens when you press Compress

The compressor never uploads your file. Your browser decodes the picture, draws it onto an HTML5 canvas at its full original size and then asks the browser’s own encoder to write a new file with canvas.toBlob(), passing the format and quality you selected. The width and height stay exactly the same; only the way the pixels are stored changes.

The savings come from lossy encoding: JPEG and lossy WebP discard fine detail the eye is least sensitive to, and the quality number (1–100) controls how much. It is the browser’s own scale, so “80” here is not the same as “80” in Photoshop or another website.

Because the picture is re-encoded from scratch, the new file contains no EXIF metadata: camera details and the GPS coordinates phones store in photos are not carried over. That is good for privacy, but copyright fields and embedded color profiles are dropped too, so keep your original if you need them.

Choosing the right quality setting

The right setting depends on the picture and where it will appear. These ranges are good starting points:

ImageFormatQuality to try
Hero banners and product photosJPEG or WebP80–90
Photos inside blog posts and articlesJPEG or WebP70–85
Thumbnails and small previewsJPEG or WebP60–75
Screenshots, logos and graphics with textWebP (or keep PNG)85–100

Fine texture such as grass or hair hides compression well; smooth skies show banding first and sharp text develops faint halos. Judge the result at 100% zoom on the part of the image that matters most.

If the file is still too large, check the pixel dimensions before you lower the quality further. A photo 4,000 pixels wide that is displayed in an 800-pixel column carries 25 times more pixels than a standard screen can show at that size, and still about six times more than a high-density screen needs. Shrinking it with the Resize Image tool first saves far more than dropping the quality from 80 to 50, and it looks better too.

When compressing an image helps

Limitations to know about

Frequently asked questions

Are my images uploaded to a server?

No. The file is decoded and re-encoded by your own browser. Nothing is sent to Img Hut or to any other service, and the compressor keeps working if you go offline after the page has loaded.

Why is my compressed file bigger than the original?

The original was probably already compressed efficiently, or you chose PNG for a photo. Re-encoding cannot recover detail that is gone, and at a high quality setting it may spend more bytes than the original encoder did. Lower the quality, switch to JPEG or WebP, or keep the original file.

What quality setting should I use?

Start at 80 for photos and check the result at full size. Go down to 60-70 for thumbnails, and up to 85-90 if you see blocky edges or banding in smooth areas such as skies.

Does compressing change the image dimensions?

No. The width and height stay the same. To reduce the pixel dimensions as well, use the Resize Image tool first and then compress the resized file.

Can I compress a PNG and keep it as a PNG?

You can choose PNG as the output, but the browser writes PNG losslessly and does not reduce the number of colors, so the size barely changes. For real savings convert to WebP, which also keeps transparency, or to JPEG if the image has no transparent areas.

Is there a maximum file size?

There is no fixed limit because nothing is uploaded. The practical limit is your device memory: very large images may fail on phones or older computers, in which case resize them first.

Related tools

Related guides