TidyTools logo TidyTools
Tools

Compress an Image to an Exact Size

Most compressors give you a quality slider and leave you guessing. This one works the other way round: tell it the size you're allowed — under 2 MB for the application form, under 500 KB for the upload that keeps failing — and it finds the highest quality that fits, automatically. Your photos are compressed inside this page and never uploaded.

Drop images here
or click to choose · JPG, PNG, WebP, HEIC, AVIF · as many as you like
KB
Save as
px

Leave the pixel limit at 0 to keep the full resolution. Quality is reduced first; the picture is only made smaller if quality alone can't reach your target.

Why "compress" usually isn't what you need

Almost every upload that rejects your photo rejects it for one reason: a number. The careers portal wants under 2 MB. The passport form wants under 500 KB. The forum won't take more than 1 MB. None of them care what quality setting you used — they care whether the file fits.

So a quality slider is the wrong control. You move it to 70, check the size, it's still too big, move it to 50, now it's too small and looks bad, and you repeat until you give up. This tool does that loop for you, properly: it compresses, measures the actual bytes, and keeps narrowing in until it has found the highest quality that still fits under your limit. It usually takes eight or nine attempts, all of them invisible, and lands within a few percent of the ceiling rather than far below it.

When the picture has to get smaller too

Sometimes quality alone can't get there. A 48-megapixel photo squeezed under 200 KB would look like a bad fax, because there simply isn't room for that many pixels at any reasonable quality. When that happens the tool starts reducing the dimensions as well, in steps, until the target becomes achievable at a quality worth looking at. It tells you when it has done this, and by how much.

This is usually the right call anyway. A 6000-pixel-wide photo displayed in a 800-pixel-wide box on a web page is 56 times more data than the screen can use. If you know the size it will be shown at, setting the pixel limit yourself gives a much better result than compression can.

JPG or WebP?

JPG is the safe answer. Everything made in the last thirty years opens it, and every upload form accepts it. If the file is going into an application, a government portal or an email to someone you don't know, choose JPG.

WebP typically reaches the same visual quality at around 25–30% fewer bytes, which matters enormously when you're fighting a tight limit. Every current browser displays it, so it's an excellent choice for a website. It's a worse choice for a form that might be checking the file extension, and older desktop software may refuse it.

A note on PNG: this tool doesn't offer it as an output, and that's deliberate. PNG is lossless, so it has no quality dial to turn — there's no way to make it hit a size target. If your image is a photograph, PNG was the wrong format to begin with and converting it to JPG will often cut the size by 80% with no visible difference. If it's a screenshot, a logo or a diagram with flat colour and sharp text, keep the PNG: JPG will smear the edges.

What happens to the metadata

Recompressing an image through this tool drops everything that isn't picture: the capture date, the camera, the software, and any GPS coordinates that were recorded. That's a side effect of how the image is rebuilt, not a feature you have to enable — but it's worth knowing in both directions.

It's good news if you're posting the photo publicly, since the location data in a photo is often more precise than people expect. It's bad news if the date mattered to you. If you want to keep it, compress a copy and keep the original somewhere safe.

Frequently asked questions

Are my images uploaded anywhere?

No. The compression happens in your browser using the same image engine that draws pages on screen. There is no server here, no account and nothing stored. Load the page once, go offline, and it still works.

Will it always hit the target?

It gets under the limit in almost every case, and tells you plainly when it can't. The one situation where it genuinely can't is an extremely small target — a few kilobytes — where even a heavily shrunk image won't fit. In that case you'll get the smallest it could manage and a note saying so, rather than a silent failure.

Why is my result well under the limit rather than just under it?

Because file size doesn't move smoothly with quality — it steps. The search finds the best quality setting whose output fits, and sometimes the next setting up jumps past the limit entirely. Landing at 1.7 MB against a 2 MB target usually means 1.7 MB was genuinely the closest step available.

Can I compress a photo more than once?

You can, but don't. JPG loses information every time it's re-encoded, and the damage accumulates — each pass builds on the artefacts of the last. Always start from the original file rather than compressing an already-compressed copy.

Does it work on HEIC photos from an iPhone?

If your browser can read them, yes — Safari and iOS can. Chrome, Edge and Firefox can't decode HEIC, so on Windows you'll want to run them through the HEIC to JPG converter first, then compress the result.

Is there a limit on how many, or a watermark?

Neither. Drop in as many as you like; they're processed one at a time so the page stays responsive. Nothing is added to the output.

Will compressing make a blurry photo sharper or smaller dimensions bigger?

No — compression only ever removes information. If you need the image to be physically larger, this is the wrong tool, and enlarging a small image will always look soft.

Running out of room for photos?

If you're compressing because storage is tight, the originals are worth keeping somewhere that isn't your phone: