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.