What Compress to Target Size does
Upload forms rarely say “use 80% quality”; they say “maximum 200 KB”. This tool takes a target size in KB or MB and finds the highest JPG or WebP quality that comes in under it, by encoding, measuring, and adjusting — typically in five to eight iterations. You get the file, the quality it settled on, and the achieved size. It runs in your browser; the image is never uploaded.
How the search works
1. Encode at quality q, measure size
2. Too big → lower q Too small → raise q
3. Repeat, halving the step each time (binary search)
4. Stop when size ≤ target and the step is below 1%, or after ~8 rounds
Example, target 200 KB:
q 0.80 → 340 KB q 0.50 → 190 KB q 0.65 → 250 KB q 0.57 → 215 KB q 0.53 → 198 KB ✓Each round is a full encode of the image, so large photos take a second or two per step. The result is always at or under the target; it is never rounded up over it.
Common size limits
| Where | Typical limit |
|---|---|
| Passport / visa photo uploads | 50–250 KB |
| Job and university application portals | 200 KB–1 MB |
| Government e-services (ID, tax, licence) | 100 KB–2 MB |
| Forum avatars and signatures | 50–100 KB |
| Email signature images | under 50 KB |
| CMS and marketplace product images | 1–2 MB |
| Email attachments (total) | 10–25 MB |
When quality alone cannot get there
Compression can only do so much: a 6,000 × 4,000 photo will not reach 50 KB at any quality without looking terrible, because there are simply too many pixels. If the tool reports a very low quality (below about 0.4) for your target, the fix is fewer pixels, not more compression. Resize first with the Image Resizer — a 1,200 px wide version of the same photo reaches 50 KB at a perfectly acceptable quality — then run the target-size compression on the result.
| Target | Suggested max dimensions before compressing |
|---|---|
| 50 KB | 600–800 px on the long edge |
| 100 KB | 800–1,000 px |
| 200 KB | 1,000–1,400 px |
| 500 KB | 1,600–2,000 px |
| 1 MB | 2,000–2,500 px |
JPG or WebP?
- JPG when the destination specifies it, which most forms do. It is accepted everywhere.
- WebP when the destination is a website you control or a modern platform: at the same target size WebP keeps noticeably more detail, or hits the target at a higher quality setting.
- Check the form's accepted formats before choosing; a WebP rejected by the uploader saves nothing.
What the output does not contain
Like every canvas-based compressor, the output has no EXIF metadata — GPS, camera and date are removed, which is usually desirable for an upload. Dimensions are unchanged unless you resized beforehand, and transparency is lost in JPG output (filled white) but kept in WebP.