Skip to main content
ImgToolZone

How to Compress an Image to a Specific Size

Updated September 22, 2026

Forms and portals may set limits such as 100 KB, 50 KB or 20 KB, alongside requirements for format, dimensions and image quality. A file below the size limit can still be rejected. This guide explains how to try quality-based compression, when to resize manually and what to check before uploading.

Let the tool search quality for you

Instead of repeatedly exporting at guessed quality settings, give the tool a size ceiling:

  • Open the compress to target size tool.
  • Drag your image onto the upload area, or click to choose a file.
  • Choose an accepted output format and enter a target below the portal limit, leaving headroom.
  • Compress. If a result fits, check its size and preview before downloading. If it cannot fit, resize manually and retry.

Image processing runs locally in your browser; your image file is not uploaded to a server.

How target-size compression works

File size is the result of encoding settings, not a number an encoder can set directly. The tool encodes trial versions, measures their bytes and binary-searches quality at the current dimensions. It searches for a result at or below the target, not an exact byte count. Success depends on the image and chosen format.

If quality alone cannot get small enough, the tool reports that it cannot fit. It does not reduce resolution automatically. Use the Image Resizer to reduce dimensions manually if the destination permits, then load that copy into the target-size tool and try again.

Understand the portal's size limit

Limits such as 20 KB, 50 KB, 100 KB, 200 KB or 500 KB vary by service; none is a universal passport, visa or job-application standard. Follow the requirements of the actual form.

This tool counts 1 KB as 1024 bytes, while a portal may use decimal KB (1000 bytes). A 100 KB target here allows 102,400 bytes, above a decimal 100 KB cap of 100,000 bytes. For that cap, a target such as 95 KB leaves headroom. If the form says "under", do not aim exactly at its boundary. Check the downloaded file's byte size rather than relying on a rounded label.

Resize before compressing for very small targets

For a large photo and a small target, reducing pixel dimensions can help more than lowering quality further. Use the Image Resizer to match the required dimensions first, without going below any minimum. Resizing is a separate, manual step, not a fallback performed by this compressor. If the target cannot be met while retaining the required dimensions and quality, check the portal's guidance rather than submitting a degraded image.

Check quality as well as size

JPG and WebP quality compression is lossy. A result can fit its byte limit while losing important facial detail or making text unreadable. Inspect the downloaded image at its intended size, and check the required format, dimensions, crop and quality. A 20 KB file is not necessarily acceptable for a passport or ID photo. Keep your original; the compressed copy is not a substitute for it.

Summary

1. Use the quality search with a target below the upload limit. 2. If it cannot fit, resize manually within the portal's dimension requirements and retry. 3. Allow for 1024-byte versus decimal KB and leave headroom for strict limits. 4. Verify downloaded bytes, format, dimensions and quality; keep your original.

Frequently asked questions

Can I compress an image to exactly 100 KB?

The tool searches for a result at or below a target, not an exact byte count. It succeeds only when quality changes can meet the target. For a strict decimal 100 KB portal cap, leave headroom, for example by targeting 95 KB here, and check the downloaded byte size. This tool uses 1024 bytes per KB; the portal may use 1000.

How do I get an image under 20 KB for a passport or visa upload?

First check the actual portal requirements. Resize manually to its required dimensions with the Image Resizer, then try the target-size tool with headroom below the limit. If it cannot fit, it reports that rather than resizing automatically. Review format, dimensions and facial detail; being under 20 KB does not ensure acceptance.

Will compressing to a set size ruin the quality?

It can. A small target may require visibly degraded quality, or may not be achievable at the current dimensions. Inspect the result against the destination requirements, not just its file size, and keep your original. No particular KB value ensures an acceptable ID photo.

Does the image get uploaded to a server?

No. Image processing happens locally in your browser and your image file is not uploaded. Ordinary site requests and tool-event analytics are separate; see the privacy policy.