How to Compress an Image to a Target File Size

Need a photo under 100KB, 200KB, 500KB or 1MB — for a form, an upload limit, or a faster page? How target-size compression actually searches for a fit, with a real measured example.

When You Need an Exact Size, Not Just "Smaller"

Most of the time "compress this image" just means "make it smaller." But some situations ask for something more specific: a government form that rejects anything over 200KB, a passport-photo upload capped at 100KB, an email system with a per-image limit. In those cases, picking a compression mode and eyeballing the result isn't good enough — you need the file under a number.

Utilao's Image Compressor has a target-size option for exactly this: pick 100KB, 200KB, 500KB, 1MB, or a custom value, and the tool searches for a fitting result instead of just applying a fixed quality level.

How the Target-Size Search Actually Works

For JPEG and WebP (formats with a quality setting), the tool searches across quality levels to find the highest quality that still fits under your target — so you get the best image the target size allows, not an arbitrarily low quality. If even the lowest safe quality is still too big, it reduces pixel dimensions as a last resort and tells you this happened, rather than silently degrading the image further.

PNG has no quality setting — it's compressed losslessly. For a PNG target, the tool first tries lossless optimization, and only if that's not enough does it fall back to the same kind of dimension reduction, again with a clear note when it happens.

A Real Example

Compressing a 1600×1200 photographic test image (654.1KB as a JPEG) with a 200KB target:

Setting Result
Original 654.1 KB
Target: 200 KB 199.7 KB, at quality 38

The search found quality 38 as the highest quality that stayed under 200KB for this particular image — quality 39 would have exceeded the target, so the tool backed off exactly one step rather than guessing. A different image (more or less visual complexity) would land on a different quality number for the same 200KB target; the target size is consistent, the quality level that achieves it isn't.

Why the Target Isn't Always Guaranteed

If an image is genuinely difficult to compress that far (a lot of fine detail, or an already-small starting size), the search can hit a safe quality floor before reaching your number. When that happens, the tool falls back to reducing pixel dimensions rather than pushing quality so low the image becomes unusable — and it tells you honestly whether the target was actually reached. A target size is a best-effort search, not a guarantee, the same way it works for PDF compression.

JPEG vs PNG vs WebP for a Target Size

  • JPEG: the most flexible for hitting a specific size — a continuous quality range gives the search fine control.
  • WebP: similar flexibility to JPEG, typically reaching a given visual quality at a smaller file size, so it often hits small targets more easily.
  • PNG: no quality range to search, so a stubborn PNG (a busy photo saved as PNG, for instance) may need dimension reduction to hit a small target. If you don't specifically need PNG's lossless/transparency properties, converting to JPEG or WebP first (with the Convert Image tool) usually reaches small targets more gracefully.

Common Target Sizes and What They're Usually For

Target Typical use
100 KB Passport/ID photo uploads, some strict web forms
200 KB General form uploads, lightweight email attachments
500 KB Standard web images, most upload forms
1 MB Higher-quality web images, less strict upload limits

Always check the specific limit of the form or platform you're targeting — these vary.

Step by Step

  1. Open the Image Compressor.
  2. Upload your image.
  3. Choose a target size from the dropdown, or enter a custom KB value.
  4. Compress and check the reported result and whether the target was reached.
  5. If it wasn't reached, review the note — it'll say whether dimensions were reduced, and by how the file compares to your target.

FAQ

Will my image definitely end up under the target size? In most cases, yes — the search is quite effective across a wide quality range. For unusually detailed images or very small targets, dimensions may need to shrink too; the result always tells you which happened.

Does a smaller target mean worse quality? Generally yes, since quality is the main lever — but the search always picks the highest quality that fits, not an arbitrary low one.

Can I use a target size with batch compression? Yes — the same target applies to every file in a batch, with each file's own result (and whether it hit the target) shown individually.

Is target-size compression lossless? No, for JPEG/WebP it's lossy by design (that's what makes hitting a small target possible). For PNG, the initial attempt is lossless; only the dimension-reduction fallback changes anything beyond compression.


Try the Image Compressor with a target size and see your own result — original size, compressed size, and whether the target was actually reached.