Image Compressor
Compress any image to a size you choose. Set a target in kilobytes and the tool finds the highest quality that fits under it.
Leave blank for best quality with no size limit.
Finding the best quality that fits…
- Original
- —
- Result
- —
- Reduction
- —
- Dimensions
- —
How to use this tool
- Choose your image, drag it onto the box, or paste it from the clipboard. JPG, PNG, WebP and HEIC all go in; JPEG comes out.
- There is nothing to set. This page is already fixed at under 100.0 KB, JPEG.
- It scales the image down first — on our reference file, to 1131 × 1508 px — then searches the encoder quality. That run took 7 encodes.
- Download from the panel, which shows the original size, the final size and the output dimensions. Nothing was uploaded at any point.
This is the general-purpose version. If you need a specific figure that a form demands — 20 KB, 50 KB, 100 KB — the preset pages skip the setup and go straight to that target.
Image Compressor — the specification
| Target size | Whatever you enter, in KB |
|---|---|
| Output format | JPEG |
| Method | Binary search over JPEG quality |
| Input formats | JPG, PNG, WebP, GIF, BMP |
| Maximum input | 25 MB |
Image Compressor: why uploads get rejected
Landing under 100 KB is necessary but not sufficient. These are the reasons a file that meets the size still gets sent back:
- The image is a PNG screenshot and the target is very small. PNG photos are far larger than the JPEG equivalent — converting is usually enough on its own.
- The source is enormous in pixel terms. The tool shrinks dimensions automatically when quality alone cannot reach the target.
- The file has already been compressed several times, so quality degrades quickly.
How it works
Hitting a size limit exactly is a search problem, not a setting. There is no quality value that means “100.0 KB” — how many bytes a given quality produces depends entirely on the picture. So this tool encodes, measures the real file, and adjusts.
It starts by capping the pixel count, because quality alone cannot rescue an image that is simply too large. On the reference file measured below that meant going from 1536 × 2048 to 1131 × 1508 before the first encode. That ordering is what keeps the search cheap: the six or seven encodes that follow all work on the smaller image.
It then binary-searches the quality parameter: encode, measure, halve the remaining range, repeat. The run below took 7 encodes to land at 98.7 KB. A tool that picks one fixed quality instead either overshoots the limit or comes in far under it and throws away detail you did not need to lose.
Every one of those encodes ran on your own device through the browser’s canvas API — including the intermediate attempts the search threw away. None of them was uploaded.
A measured run of this exact preset
Not an estimate: this page’s own code, run against a 3 MP photograph and an A4 scan at 200 dpi, with every encode recorded. The files and the method are published here.
| Input | Result | Change | Outcome |
|---|---|---|---|
| 3 MP photograph 1536 × 2048 px · 788.0 KB | 98.7 KB 1131 × 1508 px | 87% smaller | Under the 100 KB limit |
| A4 scan at 200 dpi 1654 × 2339 px · 996.0 KB | 99.8 KB 1099 × 1554 px | 90% smaller | Under the 100 KB limit |
Step by step
Before touching quality at all, the tool worked out how many pixels 100.0 KB can realistically describe, and scaled the image from 1536 × 2048 down to 1131 × 1508 — 46% fewer pixels. Doing this first is what keeps the run quick: every attempt after it encodes the smaller image rather than the original.
The first probe at quality 0.96 came out at 608.5 KB, about 6.1× the 100.0 KB limit, so the search began.
It then narrowed the quality setting 6 times — quality 0.51 gave 80.6 KB, quality 0.73 gave 148.3 KB, quality 0.62 gave 103.7 KB, quality 0.57 gave 92.9 KB, and so on — settling on quality 0.59.
Final file: 98.7 KB, using 98.7% of the allowance, with 1.3 KB to spare.
Who needs Image Compressor
Anyone who needs a smaller image without a specific published requirement — email attachments, faster web pages, or fitting under an upload cap you can see on screen.
Image Compressor — frequently asked questions
What target should I choose?
For web images, 100–300 KB is a good balance. For a form with a stated limit, use that figure. For an email attachment, anything under 1 MB is comfortable.
Why is the output always JPEG?
JPEG reaches small file sizes on photographs far more efficiently than PNG, and it is the format upload forms accept most reliably. If you need PNG or WebP specifically, use the dedicated converter pages.
Will the file still be under 100 KB after I save it again?
Yes, as long as you do not re-encode it. Downloading and uploading the same file changes nothing. Opening it in an editor and saving again re-compresses it and can push the size back up, so upload the file you downloaded here rather than a copy you have edited.
Which file types can I upload?
JPG, PNG, WebP, GIF, BMP and HEIC from an iPhone all go in. The output here is JPEG. Conversion happens as part of the process, so there is no need to convert first.
Does this work on a phone?
Yes, including photos straight from your camera roll. The work happens on the device, so a very large image is slower on a phone than on a laptop, but nothing is uploaded either way.
Is this tool really free?
Yes. No account, no trial period, no watermark on the output and no cap on how many times you use it. The site is funded by advertising.
Related tools
From other categories
Background reading: How to Compress an Image to Any Size: The Complete Guide
Your photo never leaves your device. Open your browser's Network tab while you use this page and you will see no upload — how that works.
Disclaimer. Published requirements change without notice. Confirm against the official source before you submit. Full disclaimer.