Skip to content

Blog

Compress4 min read

How to compress an image to an exact size in KB

Forms often ask for a photo under 100 KB or 200 KB. Learn how quality and dimensions trade off, with measured sizes, and how to hit a target size.

Application forms, exam portals and government sites love a size limit. "Upload a photo under 100 KB." "Maximum 200 KB." The photo from your phone is five or ten times too big, and the site rejects it with a vague error.

Getting to an exact size is not guesswork. Two settings control it, and once you know how they trade off you can reach a target in a few tries.

The two settings that decide file size (link to section)

Quality is how much detail the encoder keeps. Lower quality throws away fine detail and gives a smaller file.

Dimensions are how many pixels the image has. Fewer pixels means less to store.

They work together. A large image at low quality and a small image at high quality can end up at the same size, but they will not look the same. The large one looks blocky and the small one looks soft.

What the numbers look like (link to section)

The table shows the highest JPG quality (MozJPEG) that stays under each limit, at four widths. The source is a 2400 by 1600 pixel test photo with texture and grain, so smooth real photos may need lower quality settings or land smaller.

Target2400 px wide1600 px wide1200 px wide800 px wide
500 KBquality 89 (444 KB)quality 95 (299 KB)quality 95 (143 KB)quality 95 (55 KB)
200 KBquality 79 (193 KB)quality 92 (197 KB)quality 95 (143 KB)quality 95 (55 KB)
100 KBquality 68 (99 KB)quality 85 (96 KB)quality 92 (92 KB)quality 95 (55 KB)
50 KBquality 53 (50 KB)quality 76 (49 KB)quality 85 (47 KB)quality 93 (43 KB)

Read across a row. For a 100 KB limit you can keep all 2400 pixels at quality 68, or drop to 1200 pixels and keep quality 92. The second is almost always the better photo, because most screens and form previews never show 2400 pixels anyway.

A method that works (link to section)

Check what the limit really is (link to section)

Read the form carefully. Some sites want a size range, such as 20 to 50 KB, and some also fix the dimensions. If both are fixed, start with the dimensions.

Resize first (link to section)

Shrink the long side to what the photo needs. A passport style photo is fine at 600 to 800 pixels. A general photo for a form is usually fine at 1200 to 1600 pixels.

Lower quality in small steps (link to section)

Start at quality 85. If the file is still too big, drop by 5 and check again. If it is far under the limit, raise it. The goal is the highest quality that stays at or below the limit.

Check the result by eye (link to section)

Zoom to 100 percent and look at faces, text and edges. If it looks rough, go back and resize a little more instead of lowering quality further.

Why it rarely hits the number exactly (link to section)

Quality moves in whole steps, and each step changes the size by a few percent, so you land just under the limit rather than exactly on it. In the table the 100 KB rows came out at 99, 96 and 92 KB. That is fine. Forms check that a file is at or below the limit, not that it matches it.

If a form needs a minimum size as well, such as at least 50 KB, raise quality or dimensions until you are inside the range.

Tips for specific jobs (link to section)

  • Passport and ID photos. Crop to the required shape first, then resize, then compress. Cropping after compressing wastes the work.
  • Scanned documents. Convert to grayscale if the form allows it. It usually helps.
  • Photos with plain backgrounds. They compress far better than busy scenes, so a studio style shot hits a small limit more easily.
  • Screenshots. Use PNG or WebP instead of JPG, as described in the format guide.

Do it in the browser (link to section)

You can do all of this without uploading the photo anywhere. The Compress to KB tool is built for it: you set a target size, and it searches for the right quality.

Compress to exact KB

Hit an exact size limit like 20 KB, 50 KB or 200 KB

Open tool

If the form wants specific dimensions as well, such as a 35 by 45 mm photo, try the exam photo tool.

Exam photo resizer

Resize photos into the 20–50 KB range exams ask for

Soon

Questions

Tools in this guide

Last updated

Search

Search tools and guides