Fit an image to a target size

Enter the file size you need and this searches for the highest JPEG quality that still lands at or under it. It is the same compressor as Compress Image, with the fit to a target size mode already selected.

Related ways to use this tool

How to use Fit Image to a Target Size

  1. Add one image. Drop a single image onto the upload area or choose it from your device. Fit to a target size works on one image at a time.

  2. Check the mode. Fit to a target size is already selected. Switch to Compression level for Low, Medium or High.

  3. Type the target. Enter the size in Target size (KB).

  4. Fit the image. Select Fit image to size and wait for the progress bar to finish.

  5. Download the result. Compare the sizes and download the JPEG. If the target was missed you are told.

Limits and privacy

  • One image at a time in this mode, up to 25 MB.
  • Output is always JPEG, so PNG and WebP inputs are re-encoded as JPG.
  • An image with real transparency is left untouched, because JPEG cannot store transparency.
  • If the target cannot be reached you get the smallest result the tool can make, marked as missing the target.
  • The file is processed in your browser and is not uploaded.
  • Without an account you get 3 free actions on this tool every 24 hours; signing in removes the cap.

Frequently asked questions

How do I get an image under a certain number of KB?

Enter the number in the Target size (KB) field and select Fit image to size. The tool searches for the highest JPEG quality that lands at or under that size.

What if the image is still bigger than my target?

You get the smallest JPEG the tool could produce, marked as missing the target. Resizing the image to fewer pixels first usually helps with very small targets.

Why was my PNG left unchanged?

A PNG or WebP with transparent pixels would lose its transparency as a JPEG, so the tool leaves it as it is and tells you.

Is my image uploaded?

No. The compression runs in your browser, so the file stays on your device.

What's next