Home / Images / Image Compressor to Target Size
Image Compressor to Target Size
Make a photo fit a form or messaging limit while showing the quality tradeoff.
This tool processes selected files in your browser.
Accepted: image/png, image/jpeg, image/webp, .png, .jpg, .jpeg, .webp. Desktop cap 30 MiB per file.
Decimal kilobytes. 200 KB means at most 200000 bytes.
PNG size is not controlled by JPEG-style quality. AVIF is disabled until a probed encoder exists.
Lowest encoder quality the search may try. Ignored for PNG.
If quality cannot meet the target, shrink the long side. Off keeps original pixel size.
Long-side cap used when downscale is allowed.
Bounded encoder tries. The search does not assume a monotone size curve.
How it works
- Choose JPEG, PNG, or WebP files. Type is read from bytes.
- Set a target size. The tool searches encoder quality until the cap is met or reports TARGET_UNMET.
- Download a new file. A candidate that misses the target is still a real encode, not a renamed original.
Files stay in this tab. No upload.
Lossless PNG may miss a tiny target. Originals are not overwritten.
Supported inputs and outputs
JPEG, PNG, WebP. AVIF is gated.
Example
A PNG under a 200 KB cap encodes to a file at or below 200000 bytes.
Questions and answers
What if the target is impossible?
The job reports TARGET_UNMET and still offers the best candidate.
Related: Batch Image ConverterBatch Resize, Crop and PadImage Metadata Inspector and Cleaner