Compress a photo to an exact file size

Government upload forms reject photos that are over their size limit, and most phone photos are far too big. This shrinks yours to a size you choose — pick a preset for your form, or type an exact number of KB. It runs in your browser, so your photo is never uploaded.

  • Free, no watermark
  • No sign-up
  • Runs in your browser

How to use it

Nothing is uploaded. This runs on your device, so we never receive your image. Need the whole photo made to spec instead? Use the passport photo maker.

Why forms cap the file size

The number comes from the system that receives your file, not from anyone judging the picture. An automatic check enforces it before a human opens your application, so the failure is usually silent. On the DS-160 an oversized file simply stops the page advancing, with no explanation. China's COVA refuses the upload and, after three failed attempts, tells you to bring a printed photo to the visa centre instead. Some portals also set a floor: US online passport renewal will not accept a file under 54 KB. A photo can fail for being too small as easily as for being too big.

The limits we can pin down

The DS-160 visa upload takes a JPEG of 600 x 600 to 1200 x 1200 pixels at 240 KB or less. The Diversity Visa entry wants exactly 600 x 600, also 240 KB or less. US online passport renewal accepts JPG, PNG, HEIC or HEIF between 54 KB and 10 MB. China's COVA takes a JPEG of 354 x 472 pixels between 40 KB and 120 KB. India's OCI registration portal allows up to 500 KB, while Indian Visa Online asks for 10 KB to 300 KB, so two portals of the same government do not agree with each other.

Use the figure printed on the page you are uploading to. These numbers get revised without notice, and where a portal's help page and its upload checker disagree, the checker is the one that decides. If your form names a maximum we have not listed, enter that number.

Compressing is not resizing

Compression changes how much detail is kept when a JPEG is saved. It does not change width and height. A 1200 x 1200 photo squeezed from 900 KB down to 200 KB is still 1200 x 1200 pixels afterwards. Resizing is the other lever: fewer pixels, and a much smaller file as a side effect, since 600 x 600 holds a quarter of the pixels of 1200 x 1200.

Forms call both of them the photo's size, which is where this goes wrong. Read the wording of the error. KB, MB or "file too large" means compress. Pixels, dimensions, width, height or resolution means resize.

Every save costs you something

JPEG is lossy and the loss is permanent. The second save works from the damaged copy rather than your original, so quality drops again. After four or five rounds you get blocky squares around hair and eyes, and a faint halo where the face meets the background.

The re-saves you do not notice cause the most trouble. Sending the photo to yourself over WhatsApp or text recompresses it silently, which is why the State Department warns applicants not to text themselves the file. Go back to the camera's original and compress once, rather than compressing an already compressed copy.

Under the cap and still refused

When the file size is right and the upload still fails, check the pixels next. Most portals set a resolution floor as well as a size ceiling: US passport and visa photos must be at least 600 x 600, the DV lottery wants exactly 600 x 600, COVA wants exactly 354 x 472. Compressing does nothing to any of those. Format is the other frequent cause, since the DS-160 and COVA accept JPEG only. The DS-160 also caps the compression ratio at 20:1, so a file crushed far below 240 KB can be refused for being too compressed rather than too large.

Common questions

What size does my passport photo need to be?

It depends on the form. The US DS-160 visa form accepts up to 240 KB, India's OCI portal up to 500 KB, and China's COVA system wants 40–120 KB. If your form states a maximum, enter it exactly — this tool will get you under it.

Will compressing ruin the quality?

Some quality is lost, that is what compression is. The tool starts at high quality and steps down only as far as it needs to, so you get the best picture that fits under your limit. If the result looks blocky, your target is probably too small for the image dimensions — try reducing the pixel size first with the resize tool.

Is my photo uploaded to your server?

No. The compression happens inside your browser using your own device. Nothing is sent to us, and we never see the image. You can disconnect from the internet after the page loads and it still works.

Why is my photo rejected even though it is under the limit?

File size is only one rule. The photo also has to be the right dimensions, on a plain background, with your head at the correct size in the frame. If it keeps failing, make the photo with our passport photo maker, which handles all of those at once.

Does this work on a phone?

Yes. It works in any modern mobile browser, including photos taken straight from your camera and Apple HEIC files.

Can I compress a photo to exactly 240 KB?

You can get just under it, not exactly on it. JPEG quality moves in steps, so each attempt lands somewhere below the number you asked for. Portals check "no more than", never "equal to". Where the form sets a window instead, such as COVA's 40 to 120 KB, aim for the middle rather than the edge.

Is there a minimum file size?

On some forms, yes. US online passport renewal refuses anything under 54 KB, COVA under 40 KB, and Indian Visa Online under 10 KB. Files usually drop below a floor by accident, after passing through a chat app or being exported from an already shrunken copy. Re-export the original at higher quality rather than trying to enlarge the small file.

Does compressing change the resolution or DPI?

No. The pixel dimensions and the DPI tag stay as they were, and only the detail stored in those pixels changes. It does matter for printing: a 4 x 6 sheet printed from a heavily compressed file shows the artefacts on photo paper, even when the same file looks fine on a phone screen.

Should I crop first or compress first?

Crop, then resize, then compress, in that order and once each. Every step re-saves the JPEG, so compressing early means you damage pixels you are about to discard anyway. Compressing last also tells you straight away whether the finished file clears the limit.

Can I compress an iPhone HEIC photo?

Yes, and the file you get back is a JPEG, which is what most portals want. The DS-160 and COVA take JPEG only, so a HEIC straight from the camera roll is refused whatever its size. US online passport renewal is the exception and accepts HEIC and HEIF.

Other free tools