Compress to Target File Size

Upload image

Choose, paste, or drag and drop a file here
Max file size: 1024 MB
or
Supported: GIF, JPG, PNG, WebP, AVIF. Max: 1GB.

About this tool

Every other compression tool asks what quality you want and tells you the resulting size. This one works the other way round. You name the size and it works toward it.

That sounds like a small difference and it is not, because the problem people actually have is almost never about quality. It is about a form that refuses to accept anything over two megabytes.

This tool accepts GIF, JPG, PNG, WebP and AVIF files up to 1GB, with quality and target size controls and runs in your browser.

Who needs an exact number

Government and visa application portals, which commonly cap photo and document uploads at a fixed size and reject anything above it with an unhelpful error.

Job application systems and university portals with the same kind of limit.

Email attachment limits, where the total has to come in under a threshold.

Forum, marketplace and content system uploads.

Banking and insurance document submissions.

In every one of these the requirement is a hard number from somebody else. Guessing at a quality percentage and checking the file size afterwards, over and over, is the tedious process this replaces.

Aim slightly under the limit

If the requirement is two megabytes, target somewhere below it rather than exactly at it. Some systems measure the encoded upload rather than the file on disk and a file sitting exactly on the boundary occasionally gets rejected for reasons nobody explains. Leaving a little room avoids the whole argument.

When the target is too aggressive

A target far below what the image can reasonably carry has to be paid for somewhere and the payment is visible quality. If a four megabyte photograph has to reach two hundred kilobytes, expect blotches in smooth areas and softness in fine detail.

When that happens, reduce the dimensions rather than crushing the quality further. An image at half the width and height has a quarter of the pixels, which gets you most of the way to the target with far less visible damage than extreme compression. If the upload is a passport photo or a document scan that will be viewed small, nobody will ever see the difference.

Check the result at full size before submitting. A document scan that has become unreadable has failed its purpose even if it meets the size requirement.

Read the requirements properly first

Upload rejections are often not about file size at all. Portals frequently specify minimum and maximum pixel dimensions, an accepted format list and sometimes an aspect ratio and they report every failure as the same generic error.

Before compressing repeatedly, check whether the form also demands particular dimensions or a specific format. Meeting the size limit while failing the dimension requirement produces exactly the same rejection message.

Supported formats and limits

GIF, JPG, PNG, WebP and AVIF up to 1GB.

Related tools

To work by quality rather than size, use Compress JPG or Compress PNG. For many files at once use Bulk Image Optimizer. If the file is a PDF page rather than an image, start with PDF to JPG.

Frequently Asked Questions

Will it hit the exact size I ask for?

It works toward your target. Aim slightly under the limit you have been given rather than exactly at it, since some systems measure the upload differently from the file on disk.

My portal keeps rejecting the file even though it is small enough. Why?

The limit is probably not the only requirement. Many portals also specify pixel dimensions, format or aspect ratio and report every failure with the same error.

The image looks bad at my target size. What should I do?

Reduce the pixel dimensions rather than compressing harder. Halving the width and height quarters the pixel count and damages the image far less than extreme compression.

Does it work on PNG files?

Yes, though PNG responds to compression by reducing colors rather than quality. For photographs stored as PNG, converting to JPG first reaches small targets much more comfortably.

Can I do a whole batch at once?

Use Bulk Image Optimizer for multiple files.

Is there a size limit?

1GB per file.