Skip to content
helpyself

Compress Image to Size

Local only — nothing is uploaded unless you save or share it.

Compress image to 100KB, 1MB, or whatever exact size the form demands.

  1. Choose your images, or drop a folder on the page
  2. Type the limit you have been given, in KB or MB
  3. Download them — each one under that size, at the best quality that fits

Share a link

Saves this to your files and gives you a web address anyone can open. It stops working on its own.

Link lasts
Save this tool

Keep Compress Image to Size handy

Bookmark it

About this tool

Most compressors give you a quality slider and leave you to guess, which is fine until something else has already decided the answer for you. Upload forms cap attachments at 2 MB. Job portals want a photo under 100 KB. Forums, visa applications and government sites all pick a number and reject anything above it, usually after you have filled in the rest of the form. A slider cannot answer that, because the relationship between quality and file size depends entirely on the picture: 60% might land at 40 KB for a plain background and 400 KB for a busy street scene. This works the other way round. You give it the limit, and it encodes each image repeatedly — narrowing by half each time — until it finds the highest quality that still fits underneath. That takes seven or eight attempts per picture and about a second, and it matters that it looks for the highest rather than merely any: settling for the first quality that fits would throw away detail you could have kept. Drop in a whole folder and every image gets its own search against the same limit. That is the point of doing them together rather than one at a time: the same 200 KB cap lands at 90% quality for a simple graphic and 60% for a detailed photograph, so one shared setting would be wrong for most of them. Several images come back as a zip; one comes back as itself. If a target cannot be reached at all, which happens when a large photo is asked to fit in a very small space, it says so for that file and tells you how much smaller the dimensions would need to be. Everything happens in your browser — the pictures are never uploaded, which is worth knowing when the reason you are compressing them is to send them to a stranger.

Frequently asked questions

How does it hit an exact size?

By trying. It encodes the image at a high quality, measures the result, and halves its way towards the target — a binary search, usually seven or eight attempts per picture. There is no formula that maps quality to file size, because the answer depends on the picture: fine detail and noise cost far more bytes than flat colour, so the same setting produces wildly different sizes for different photos.

How do I compress a JPEG to 50KB exactly?

Type the target and it searches for the quality that lands just under it — compress jpeg to 50kb, or any other figure, without the guess-and-check of a quality slider. It is the same search whatever the number, which is why compress image to exact size is the honest description: the tool works backwards from the limit you were given.

Can I bulk compress images to size?

Yes. Drop in a folder and every picture is squeezed under the same limit independently, because a target of 100 KB means each file under 100 KB rather than the set of them. Each one gets its own quality search, so a simple graphic keeps more quality than a detailed photograph while both land under the number.

How do I compress an image to 100KB?

Drop it in, type 100 KB as the target, and the tool searches for the highest quality that still fits under it. That search is the difference between this and a quality slider: a slider makes you guess and check, while this does the guessing — usually eight to twelve attempts, all of them in your browser, none of them uploaded. The same works for any figure, so compress a JPEG to 50KB or an image to 1MB by typing that instead.

Is 100 KB 100,000 bytes or 102,400?

This tool treats 1 KB as 1,024 bytes, which is what upload limits almost always mean and what Windows shows you. So a 100 KB target means 102,400 bytes. If a form is rejecting a file that this tool says fits, that difference is the first thing to check.

Can I compress several images at once?

Yes — drop in up to thirty and they all get squeezed under the same limit. Each one is searched separately, which is the reason to do them together rather than one at a time: the same 200 KB cap might land at 90% quality for a simple graphic and 60% for a detailed photograph, so a single shared setting would be wrong for most of a folder. They download as a zip, and one image on its own still downloads as an ordinary file.

Why can it not reach my target?

Because there is a floor. Below roughly 20% quality an image becomes visibly blocky, and a large photo simply cannot fit into a very small file at any setting — twelve megapixels will not become 20 KB and still be a photograph. When that happens the tool says so for that file rather than handing back a smear, and suggests reducing the dimensions, which is the lever that actually works at that point. In a batch the others still finish.

Does it change the format?

It picks whichever of JPEG or WebP suits the image, since PNG has no quality dial to search over — it is lossless, so the only ways to shrink it are fewer colours or fewer pixels. If you need the result to stay PNG, resize it instead.

Will my photo be uploaded anywhere?

No. The compression runs in your browser using the same graphics code that draws the page, so the file never leaves your machine. There is a public API for scripts, which does run on our servers, but the tool on this page does not use it.

How is this different from your image compressor?

The image compressor takes a quality and tells you the size. This takes a size and finds the quality. If you just want a smaller file, that one is simpler and lets you see the trade-off. If something has given you a number you must fit under, this one is the tool that answers it.

Help improve this tool

Found a bug, want a change, or need a tool we don't have?

/compress-to-size

↑↓ to move · Enter to open · Esc to close