Compress an image

Give it a target — 200 KB, 500 KB, whatever the upload form demands — and the right quality is found for you.

Your file never leaves this device. There is no upload step — the work happens in this browser tab.

Drop the image inIt decodes on your device. Nothing is sent anywhere, which matters more than usual for photos.
Name your targetType the size the form is asking for. The quality that gets you there is found by trying, measuring and trying again — about seven attempts, all instant.
Check the readout, then downloadThe panel shows the size and dimensions you are about to get. If the numbers are wrong, change the setting rather than the file.

Why "compress to 200 KB" is a search and not a setting

JPEG quality is not a file size. A quality of 80 might produce 90 KB from a flat graphic and 900 KB from a detailed photograph, because the setting controls how much detail is discarded, not how many bytes come out. Any tool offering a quality slider when what you asked for was a size is handing you the problem back.

So the only honest way to answer is to encode the image, measure the result, adjust, and repeat. A binary search across the quality range converges in about seven attempts, each taking a few milliseconds, which is why this feels instant despite being brute force.

When quality alone cannot get there — and for an aggressive target on a large photo it often cannot — the dimensions come down too, by 25% at a time. That is a real change to your image, so it is disclosed in the status line rather than done quietly.

What gets thrown away

JPEG and WebP discard the detail your eye is least likely to miss: fine colour variation first, then high-frequency texture. On a photograph the result is very hard to tell apart from the original until you zoom. On text, line art or a screenshot it is obvious immediately — letters grow a grey fringe, flat colours develop mottling.

That is the rule worth remembering. Photographs compress beautifully. Anything with hard edges and flat colour should be a PNG, and a PNG that is too large usually needs fewer pixels rather than more compression.

Metadata goes as well. Re-encoding through a canvas drops the EXIF block entirely, which includes the GPS coordinates most phones record. That is a side effect of how this works, and a welcome one.

When compressing is the wrong answer

If the image is already smaller than your target, compressing achieves nothing except losing detail, and the tool says so and refuses rather than producing a worse file to satisfy the instruction.

If the image is enormous in dimensions — a 6000 pixel photo destined for a 600 pixel slot — resizing will beat compressing every time, and by a wide margin. Reducing the dimensions by half removes three quarters of the pixels before any quality question arises. Compress after resizing, not instead of it.

Everything here happens in this browser tab. The image is decoded, redrawn and re-encoded by the Canvas API on your own device, and the result is assembled in memory and handed to you as a download. Nothing is uploaded, which you can confirm in about fifteen seconds with the network panel open.

Questions

What people ask about compressing

How does it hit an exact file size?

By searching. It encodes at a quality, measures the result, and narrows the range — about seven attempts, each a few milliseconds. Quality settings do not map to file sizes predictably, so measuring is the only reliable way.

What if it cannot reach my target?

It reduces the dimensions as well, 25% at a time, and tells you it did. If even that is not enough it gives you the smallest sensible version and says the target was missed rather than producing something unusable.

Will compressing ruin the quality?

On a photograph, not noticeably until you zoom in. On text, screenshots or line art it will be obvious — those belong in PNG, and a large PNG usually needs fewer pixels rather than heavier compression.

Does it remove EXIF and GPS data?

Yes, always. Re-encoding through a canvas drops every metadata block, including the location most phones write into each photo. It is not an option you have to remember to switch on.

Is there a file size limit?

Your device’s memory rather than a policy. Images above about 25 MB are worth watching on a phone — mobile Safari caps how much canvas memory a page may use and can fail quietly past it.