TARGET FILE SIZE

Compress an image to a target size

Set a best-effort KB ceiling, run bounded quality and dimension adjustments locally, and see whether the image reached the requested size.

Set a best-effort file-size ceiling and let the browser adjust lossy quality, then dimensions when necessary, while showing whether the target was reached.

01

Add an image and a ceiling

Choose a PNG, JPEG, or WebP source and enter the maximum size in KB. This task starts with a 100 KB JPEG target.

02

Run the bounded search

For JPEG, WebP, or AVIF, the editor searches for the highest available quality under the limit. If quality alone is not enough, it can reduce dimensions down to its safety boundary.

03

Check target status

Read the actual result bytes and dimensions. If the ceiling cannot be reached safely, the editor reports the closest result instead of claiming success.

No image selected
Drop images into the queue

Everything runs in this browser.

Add, drop, or paste up to 12 PNG, JPEG, or WebP images.

A ceiling, not an exact byte count

A 100 KB target means at or below 100 KB when reachable; it does not mean the output will be exactly 100 KB.

Format limits still apply

Palette PNG does not use a lossy quality slider, so a very small PNG target may require smaller dimensions. Transparent images exclude JPEG from Auto smallest.

When this task helps

Meet a file limit with evidence

Common questions

Why is the result below the target instead of exactly equal?

Encoders produce discrete file sizes. The search keeps a valid result at or below the ceiling rather than padding bytes to hit an exact number.

What happens when the target is too small?

The editor lowers quality and can reduce dimensions within its safety boundary. If the ceiling is still unreachable, it reports the closest result.

Which format is best for a strict size target?

Photographs usually give lossy JPEG or WebP more room to trade quality for bytes. Transparency or limited-colour graphics may require PNG or WebP.