ToolLineup

Compress Image to a Target Size

Say how large the file is allowed to be and the quality setting is found for you. This is a different job from a normal compressor: "quality 70" is not a file size, and the same setting can produce 8 KB from a flat graphic and 400 KB from a detailed photograph, so guessing at a slider until the file happens to fit is the usual experience. Here the image is encoded repeatedly, each result measured, and the highest quality that still fits under your target is kept — a binary search that lands within half a percent in about eight passes. If quality alone cannot get there, the image is scaled down in steps until it does. Presets cover the usual limits, including the 2 MB cap most passport and visa applications impose.

How it works

Say how big the file needs to be and the quality is worked out for you. "Quality 70" is not a file size — the same setting can produce 8 KB from a flat graphic and 400 KB from a detailed photo — so this encodes the image repeatedly, measures each result, and keeps the best one that fits under your target.

If quality alone cannot get there, the image is scaled down in steps until it does. Everything runs on your device, which matters when the upload limit you are working around belongs to a passport or visa application.

or drop a file here — JPEG, PNG, WebP, GIF or BMP. Nothing is uploaded; the file is read by your browser.
Target size
Lowest acceptable quality
%

The search never drops below this. If the target still cannot be met, the image is scaled down instead.

Original
Upload an image to get started.
Compressed
Result appears here.

Frequently asked questions

How do I compress an image to exactly 100 KB?

Upload it, pick the 100 KB preset or type your own figure, and the highest quality that fits under that limit is found automatically. The result is always at or below the target, never over.

How does it know what quality to use?

It encodes the image several times at different quality settings and measures each result, narrowing in on the best one that fits. That is the only reliable way, because the relationship between quality and file size is different for every image.

What if the target cannot be reached?

The image is scaled down in steps until it fits. If it still cannot, you get the smallest result available along with a note saying so — lower the minimum quality or allow resizing.

Why is PNG not an option?

PNG is lossless, so it has no quality dial to turn and a target size cannot be aimed at. JPEG and WebP are offered instead; WebP is smaller at the same visual quality.

Is this good for passport or visa uploads?

Yes — those forms usually cap uploads at 1 or 2 MB, and both are presets here. Since nothing is uploaded to a server, your identity documents stay on your own device.

Will the image be resized?

Only if you allow it and quality alone cannot reach the target. The scale actually used is reported with the result.

Related tools