Compress to Target Size
Compress a JPG, PNG, or WebP down to a target file size in KB — for passport photos, visa forms, and upload limits. A PNG over the target is converted to JPEG to reach it.
About Compress to Target Size
Compress to Target Size shrinks a JPG, PNG, or WebP to fit an exact file-size limit in kilobytes — the '100 KB maximum' kind of requirement on passport, visa, exam, and government portal uploads. Instead of guessing at a quality slider, you type the limit and the tool searches for the best quality that fits, optionally reducing dimensions when quality alone isn't enough. Everything runs in your browser; the photo never uploads.
- Category
- optimize
- Input
- Accepts: image/jpeg, image/jpg, image/png or image/webp.
- Output
- Outputs: image/* (multiple).
- Cost
- Free, runs in your browser
- Memory
- low
Common uses
- Get a passport or visa photo under the portal's 100 KB or 20 KB limit
- Shrink a scanned document photo to fit an exam application's upload cap
- Fit a headshot under a job portal's file-size restriction
- Compress email attachments to a predictable size
- Prepare images for a CMS that enforces per-file limits
Frequently asked questions
How does it hit the exact size?
It binary-searches the encode quality for the largest value that lands at or under your target. If even the lowest reasonable quality is too big, and downscaling is allowed, it reduces the dimensions in small steps and searches again.
What if my image is already under the target?
It's returned untouched, byte for byte. The tool never makes a file bigger or re-encodes needlessly.
Why did my PNG come back as a JPG?
PNG is lossless, so it often can't reach small KB targets at all. When a PNG is over the target, the tool converts it to JPG to make the limit reachable — that's stated in the result.
Will the image still look good?
The search keeps the highest quality that fits, so you get the best possible result for the limit. Very small targets on large images will show compression — that's the trade-off the limit forces.
Is anything uploaded?
No. Compression runs entirely on your device, so photos for government forms never touch a server.
Keywords
- compress
- kb
- target
- size
- passport
- visa
- upload
- limit
- shrink