Compress an image to an exact file size

Set a target like 50 KB, 100 KB or 1 MB. The optimizer finds the highest quality that stays at or under your limit, and reports exactly what it achieved.

Images never leave your device No signup, no email No file limits or watermarks Works offline once loaded

Examples: 20 KB, 50 KB, 200 KB, 1 MB. The result stays at or under this limit.

Last reviewed . Runs locally — your images never leave your device.

How it works

  1. Drop your image and type the target size (for example 50 KB or 0.5 MB).
  2. The tool runs a quality search entirely on your device and picks the best result that fits.
  3. If the target cannot be reached without visibly damaging the image, you are told exactly that — with the option to allow reducing pixel dimensions.
  4. Download the result with a clear before/after report.

Common requirements

  • 20 KB — Signature and ID photos on exam, visa and application forms — the tightest common ceiling.
  • 50 KB — The number people most often mean when they need to reduce image size in KB for forms, résumés and job portals.
  • 100 KB — Common cap on government, university and utility upload fields.
  • 200 KB — Typical CMS, marketplace and forum upload limit.
  • 500 KB — A safe size for chat apps and for pages that must stay fast on mobile.
  • 1 MB — Email attachments and CMS media libraries with a per-file ceiling.

How to compress an image to a target size (50 KB, 100 KB, 200 KB)

Type the limit exactly as your destination states it — compress image to 50 KB for a job portal, 100 KB for an exam form, 200 KB for a CMS field, 1 MB for an email attachment. The optimizer searches quality levels and keeps the best-looking result that still respects the number.

If you are here because a site warned that your file is too large to upload, copy the number from the error message or the form help text and use it as the target. When a form only says something like "under 100 KB", enter 100 KB: the result lands at or slightly below it.

Requirements are often written as a ceiling instead of a target — make image under 50 KB, "no bigger than 2 MB", "max 200 KB". Ceilings and targets are the same input here, and the report always shows the achieved size, so you can see exactly how close you landed.

Most compressors only offer a quality slider and hope for the best. This is an image compressor with a target size: the number drives the whole process, and if the target is impossible at full resolution the tool says so and offers dimension reduction as an explicit opt-in — never silently.

Supported formats

JPEG, PNG, WebP, AVIF and GIF (first frame).

Best with files up to 50 MB. Hard safety limit 200 MB.

Privacy

Everything happens in your browser: the image is decoded, transformed and encoded locally. Nothing is uploaded, and no filename, pixel data or metadata is sent anywhere. Read more on the privacy page.

Technical methodology

  • Formats with a quality parameter (JPEG, WebP, AVIF) are optimized with a bounded binary search between quality 0.05 and 0.95, capped at 14 encode passes. The search keeps the highest quality whose encoded size stays at or under your target.
  • The search stops early once the result lands within the closer of 2% of the target or 1 KB, so typical runs finish in a few passes.
  • If even the lowest quality stays above the target, the tool reports the achievable floor. Dimension reduction is applied only when you explicitly enable it, using a descending scale ladder (90% → 30%); the chosen scale is shown in the report.
  • PNG (lossless) cannot be quality-tuned. Targets that require shrinking a PNG are handled through optional dimension reduction, or by converting to JPEG/WebP when you allow it.
  • All processing happens in your browser. No image data, filename or pixel content is transmitted.

Known limitations

  • No tool can guarantee a mathematically exact size: encoders quantize output, so results land at or just under the target — never at "exactly 50.000 KB".
  • Extremely small targets (for example 10 KB for a 12-megapixel photo) can only be met with visible quality loss or smaller dimensions. The tool reports which one is required instead of silently degrading your image.
  • Animated GIF/WebP files are processed as their first frame.

Go deeper: image compression explained · choosing a free image compressor

Frequently asked questions

Does this tool upload my image?

No. The image is decoded, re-encoded and optimized entirely inside your browser tab. Nothing is uploaded, and the page works offline once loaded.

Can you make the file exactly 50 KB?

No honest tool can hit an exact byte count, because image encoders quantize their output. This tool maximizes quality subject to the limit — so you get the best-looking image that is at or under 50 KB, typically within a few percent of the target.

What happens if my target is impossible at full dimensions?

The tool shows the smallest achievable size at your current pixel dimensions. You then choose: accept the floor result, or explicitly allow dimension reduction and let the optimizer try again.

Will you ever shrink my image without asking?

Never. Dimension reduction is off by default and only applies when you enable it for that run.

Which formats work best for very small targets?

JPEG and WebP usually reach small targets with the most acceptable quality. PNG is lossless and often cannot reach aggressive targets without reducing dimensions; the tool will tell you when that is the case.