How to Compress an Image to a Target Size (100 KB, 50 KB, or Under a Limit)

Updated Jul 23, 2026 2 min read No upload — runs in your browser

To compress an image to a target size, open the Compress Image tool, drop your photo, type the size you need into the “Target size in KB” box (e.g. 100), and download it. The tool finds the highest quality that still fits under your limit, on your own device, with nothing uploaded.

Visa applications, passport-photo uploads, exam registrations and job portals routinely demand an exact ceiling: “photo must be under 100 KB,” “between 20 KB and 50 KB,” “max 200 KB.” A quality slider makes that a guessing game. A target does it for you.

Hit an exact size in your browser

  1. Open Compress Image.
  2. Drop the JPG, PNG or WebP on the page.
  3. In Target size in KB, enter your limit — 100 for 100 KB, 50 for 50 KB.
  4. Download the image. It comes out at or below your target.

Set a target and the quality slider steps aside: the tool searches for the best quality that still fits, so the photo stays as sharp as the limit allows.

How the target search works

Quality and file size rise together, so the tool runs a binary search across quality levels — encode at a middle quality, measure, narrow in. In about seven attempts it lands on the highest quality that stays under your number, all inside the browser tab.

Getting under tight limits cleanly

A 4000×3000 phone photo forced under 50 KB will look rough — not because the tool is weak, but because there are too many pixels for that budget. Shrink the dimensions first and the quality holds up far better:

  • Resize before you compress. Most upload photos only need to be ~600–1000 px on the long edge. Use Resize Image, then compress to the target.
  • Match the aspect ratio the form wants (many passport uploads specify one) so it isn’t re-cropped after you’ve optimised it.
  • Prefer JPG for photos. PNG is lossless and won’t shrink like a photograph should; for a photo, JPG or WebP hits small targets far more gracefully.

Frequently asked questions

How does compressing to an exact size work?

You enter a target in KB and the tool binary-searches the quality setting to find the largest file that still fits under it — so you don't drag a slider and guess.

What if my target size is too small?

If even the lowest quality can't reach a tiny target, you get the smallest achievable file rather than an error. For very small targets, reducing the pixel dimensions first helps more than quality alone.

Does it work for PNG?

PNG is lossless, so a KB target doesn't apply the same way — convert to JPG or WebP first if you need to hit a strict size. JPG and WebP support target-size directly.

Is the image uploaded to hit the target?

No — the whole compress-and-measure loop runs in your browser, so the photo never leaves your device.

← All guides