Compress to Size

Compress a photo until it fits a target size in kilobytes.

How Compress to Size works

Binary-search the JPEG quality until the file fits your target KB, with the result and quality shown. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.

That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.

Searching for the quality that fits

You give a target in kilobytes and the tool runs a binary search over the JPEG quality setting, re-encoding until the result lands under the target. That is faster and more accurate than guessing a quality percentage.

Targets run from 5 KB to 5 MB. If the image cannot reach the target at any quality, the tool reports the smallest size it achieved instead of pretending to succeed.

What to do when the target is unreachable

A 6000 × 4000 photo cannot become 20 KB by quality alone — there are too many pixels. The fix is to reduce dimensions first: halve the long edge and the pixel count drops to a quarter.

That combination — smaller dimensions plus moderate quality — always beats extreme quality reduction, which produces visible block artefacts.

TargetRealistic approach
Under 50 KBResize to ~800 px, then quality 70
100–200 KBResize to ~1600 px, quality 75
500 KBOriginal size often fine at 80
5 MBUsually already met

Why the file may still be over

JPEG quality is a target, not a guarantee — a busy photo with fine detail compresses less than a smooth one at the same setting. Form inputs that enforce a size limit are usually strictly enforced, so aim a little under.

Good to know

  • Works offline once loaded, including on flights and in locked-down networks.
  • No file size limit beyond your device's own memory.
  • Free to use, with no account and no usage counter.
  • Results are produced locally, so they are not logged or shared with anyone.

Questions

How does it hit the target?

It tries quality values between 5% and 95% and keeps the largest result under your limit.

What if it cannot reach the target?

The image is too detailed at that resolution — resize it smaller first.

Does it change dimensions?

No — only the compression quality. Resize separately if needed.

Is PNG supported?

The search targets JPEG quality, so the output is JPEG.

Keep going

More image tools