Compress an image to an exact file size
Give it a number in kilobytes. It works backwards from that budget — trimming quality first, then dimensions — and stops at the first setting that fits.
How it hits the target
Most compressors give you a quality slider and let you guess. This one takes the number you actually care about — the byte count the form will check — and searches for the highest quality that still lands under it.
- The image is drawn to a canvas at full size.
- It is encoded eight times, narrowing in on the quality that sits just below your target.
- If even the lowest usable quality is too big, the dimensions shrink by 12% and the search runs again.
- It stops the moment a result fits, and reports what it had to give up.
That last step matters. A 12-megapixel phone photo cannot usually reach 100 KB on quality alone; something has to go. The result panel tells you whether you lost quality, pixels, or both, so you are not guessing what the file will look like.
What actually gets sacrificed
JPEG compression throws away detail the eye is bad at noticing: subtle colour shifts, fine texture in flat areas. At quality 0.8 most photos are indistinguishable from the original. At 0.5 you start to see banding in skies and mush in foliage. Below about 0.35, text and sharp edges visibly smear.
Downscaling is usually the better trade. A 4000 × 3000 photo viewed on a phone does not need 12 megapixels; 1600 × 1200 at high quality often looks better at 100 KB than 4000 × 3000 at low quality. If you have a choice, reduce dimensions first and keep quality above 0.7.
Questions
Why is my PNG still large?
PNG is lossless, so it ignores quality settings entirely — the only lever is dimensions. If you need a small file and do not need transparency, switch the output to JPG.
Does compressing twice make it worse?
Yes. Every JPEG save is a fresh round of loss. Always start from the original, not from a file you already compressed.
Will the colours change?
JPEG stores colour at lower precision than brightness. Large flat areas of saturated colour can shift very slightly at low quality settings. Photos are not affected in any way you would notice.
Is my photo uploaded?
No. The compression runs in your browser. You can verify by opening your browser's network panel — no request carries image data.