中文
Ad slot top
No ad code configured yet
Home›Tutorials›How to compress a photo to an exact KB size

How to compress a photo to an exact KB size

2026-10-02 · Image Tools

Ad slot in_content
No ad code configured yet

Application portals do not ask for "a smaller photo". They ask for a number. Under 240 KB. Between 40 and 120 KB. At least 20 KB. Hitting a specific target is a different problem from generic compression, and the naive approach — dragging a quality slider down until it fits — produces a file that passes the size check and fails the quality check.

Order of operations matters

Always resize to the required pixel dimensions first, then compress to the byte target. Doing it the other way round wastes effort: JPEG compresses more efficiently at the correct dimensions, and you avoid fighting the size limit only to discover the pixel count is also wrong.

A 4032×3024 phone photo is roughly 3.6 megapixels of real data. A 600×600 US visa photo is 0.36 megapixels — a tenth of it. Most of the file size disappears in that first step, before any quality setting is touched.

What actually drives JPEG file size

  • Pixel count. The dominant factor, and roughly linear.
  • Quality setting. Not linear at all. Going from 95 to 85 saves a little; going from 85 to 75 saves a lot and is usually invisible; below about 70 the artefacts become obvious, especially around text and fine detail.
  • Image content. A plain background compresses far better than foliage or fabric texture. This is why a portrait can often hit 100 KB where a landscape cannot.
  • Metadata. EXIF, GPS and thumbnails can add tens of kilobytes for no visual benefit.

Practical targets

  • 240 KB, 600×600 px — the US visa ceiling. A 600×600 portrait lands around 60-120 KB at quality 85, so you are inside the limit with room to spare and no visible loss.
  • 40-120 KB, 354×472 to 420×560 px — China's visa range. Note the lower bound: if the export comes out at 28 KB, raise the quality rather than shipping a degraded image.
  • 100 KB, square — common on Korean electronic permits. Easily met at moderate pixel dimensions.
  • 20 KB minimum — many Chinese exam registrations. Again a floor, not a ceiling. Aim for 30-60 KB.

The iterative approach, done properly

A single-pass slider guess rarely lands on the nose. A better loop:

  1. Resize to the exact required dimensions.
  2. Export at quality 85 and check the file size.
  3. If it is over, drop the quality by 5 and re-export. Repeat.
  4. If it is under a stated minimum, raise the quality by 5.
  5. Stop as soon as you are inside the range. Do not keep compressing "just in case".

Two or three iterations is normal.

Doing it in the browser

Our image compressor takes a target file size in kilobytes and does the iteration for you, showing the before-and-after size for each file alongside the percentage saved. It also handles several files in one pass and can package the results as a ZIP. Everything runs locally — your photos are never uploaded, which matters when the photo in question is your passport picture.

If the file also needs cropping to a specific document format, start with the ID photo tool and apply the size limit there instead: it crops and compresses in one step.