Exactly
CLIENT-SIDE · NOTHING LEAVES YOUR BROWSER

Compress to an
exact file size.

Give it a target in KB or MB. It weighs quality against resolution — iteration by iteration — until the output settles as close to that number as an image can get, shown live on the scale below.

Drop an image, or click to browse
JPG · PNG · WEBP — up to 40MB
preview
FILE—
DIMENSIONS—
ORIGINAL—
Lossy — quality and resolution both adjust to hit your target.
Convergence
idle
TARGET CURRENT
Target—
Best match—
Quality—
Output dimensions—
Iterations—
Original — —
original
Compressed — —
compressed
Process

How the target-size search works

01

Set a target

Enter a size in KB or MB, or pick a preset. This is the number the compressor will try to land on.

02

Quality is binary-searched

For JPEG and WEBP, the encoder quality is searched between attempts until the output is within about 3% of target.

03

Resolution steps in if needed

If minimum quality still exceeds the target, pixel dimensions are reduced and the quality search runs again at the smaller size.

Questions

Frequently asked

Can I really compress an image to an exact file size?

You can get very close — usually within a few percent of your target, shown as "best match" in the readout after you run the compressor above. Exact-to-the-byte results aren't possible with any compressor since encoders only expose discrete quality steps, but the search keeps the closest result it finds across every attempt.

Is my image uploaded anywhere?

No. Everything runs in your browser using the Canvas API — the image never leaves your device. That's also why there's no file-size limit tied to a server and no queue.

JPEG, WEBP, or PNG — which should I choose?

Use JPEG for photos when broad compatibility matters, WEBP when you want the smallest file at a given quality, and PNG only when you need lossless output (e.g. screenshots with text or transparency). See the format picker in the compressor above for notes on each.

Why did my image shrink in dimensions, not just quality?

If your target is smaller than the image can reach at minimum quality, the only way left to shrink the file further is to reduce pixel dimensions. The final output dimensions are always shown in the results panel.