imagetoolbox

Compress an image to a target size

Tell it the file size you need, like 500 KB, and it finds the best quality that fits. Downscaling is optional for tight targets.

How to compress an image to a target size

  1. Drop an image in the zone above.
  2. Set the target size and pick JPG or WebP. The tool searches for the best quality that stays under it.
  3. Check the result line, then download. Allow downscaling if the target is very tight.

How the compressor hits the target

The tool runs a binary search over the quality setting, encoding the image a handful of times until it finds the highest quality that still fits under your target. If even the lowest quality is too big, it can shrink the dimensions step by step and search again.

WebP usually lands noticeably smaller than JPG at the same visual quality, so try it first when the site you are uploading to accepts it.

Like everything on this site, the tool runs entirely in your browser. Your image is never uploaded, and the server only serves this page.

More tools

All image tools

Everything runs in your browser. Your files never leave your device. No uploads, no accounts.