Home › Image › Compress Image to a Size

Compress Image to an Exact Size

Reduce a photo to a maximum file size in KB or MB, in your browser. Quality and dimensions are adjusted automatically so the image fits. Batch, no upload.

Drop files here, paste with Ctrl+V, or

Accepts .jpg, .jpeg, .png, .webp, .heic, .avif, .bmp · Processed on your device, never uploaded

Runs on the MozJPEG, libwebp, and OxiPNG encoders compiled to WebAssembly. Your file stays in this tab.

About this tool

Application forms, ID uploads, job portals, and marketplaces reject photos over a certain size and rarely say how to fix it. Pick the limit and the tool finds the highest JPG or WebP quality that fits, shrinking the pixel dimensions only when quality alone will not do. Drop a whole folder to process everything to the same limit.

Because the compression runs on your device, personal documents and photos are never uploaded to get resized.

How to use it

  1. Drop your JPG, PNG, WebP or HEIC files into the box above, or click to browse. Nothing is uploaded.
  2. Adjust the options if you want; the defaults suit most files.
  3. Click the button and wait a moment.
  4. Download the results individually or all at once as a ZIP.

Questions

How is the size reached?

The image is re-encoded as JPG (or WebP) at decreasing quality until it fits, and if quality alone is not enough the pixel dimensions are reduced as well. The best-looking combination that fits is kept.

Why did my PNG come back as a JPG?

PNG is lossless and cannot be forced under a size, so photos are saved as JPG, which is what forms and portals expect. Pick WebP if the destination accepts it: it is smaller at the same quality.

Is the result exactly the size I chose?

It is at or just under it. The tool aims for the largest file that still fits, so quality is as high as the limit allows.

Is it free, are files uploaded, which browsers work: the general questions are answered once for the whole site.

Format guides

Related tools

More image tools

View all
HEIC to JPG.heic → .jpgHEIC to PNG.heic → .pngPNG to JPG.png → .jpgJPG to PNG.jpg → .pngPNG to SVG.png → .svgJPG to SVG.jpg → .svgWebP to SVG.webp → .svgWebP to PNG.webp → .png