N

Runs in your browser · nothing is uploaded

Compress Image to Target Size

Compress images under a size limit — like 100 KB for a form upload — with JPG, PNG and WebP supported, the exact byte size shown and an honest warning if a target can't be met.

Settings

Target: 200,000 bytes. Upload forms rarely say which they mean — 1,000 is the stricter choice and satisfies both.

JPEG and WebP lower the quality step by step to hit the target. PNG is lossless: it's optimized with oxipng, and if that isn't enough only the dimensions can be reduced.

Background for transparent areas when saving as JPEG (JPEG has no transparency).

px

Optional

px

Optional

Images are never enlarged. Photo orientation is applied, and EXIF details (camera, location) are not copied into the new file.

How it reaches the target

  1. The image is fitted inside your max width and height (never enlarged).
  2. JPEG/WebP: it tries high quality first, then binary-searches for the highest quality that fits.
  3. If the lowest acceptable quality is still too big and resizing is allowed, the dimensions shrink by the square root of the overshoot and the search repeats.
  4. PNG: lossless optimization with oxipng, then resizing if allowed.

Worked example

A 3.2 MB phone photo with a 200 KB target and 1 KB = 1,000 bytes must end up at no more than 200,000 bytes. At full resolution even low quality is too big, so it's scaled down, then the highest quality that fits is kept — and the list shows the actual size, dimensions and quality used.

Frequently asked questions

How do I compress an image to 100 KB?+

Enter 100 KB as the target, add your images and press Compress. For JPEG and WebP the quality is lowered step by step until the file fits; if even low quality is too big, the dimensions are reduced too (you can turn that off). The result shows the exact byte size.

Is 1 KB 1,000 or 1,024 bytes?+

Both are used. Choose which with the switch — by default 1 KB = 1,000 bytes, which is the stricter limit: a file under 100,000 bytes is under 100 KB either way.

Can PNG files be compressed to a target size?+

Only partly. PNG is lossless, so there's no quality setting. The tool re-compresses it with oxipng, which shrinks the file without changing a pixel. If that still isn't small enough, it can reduce the dimensions — or you can save as JPEG or WebP instead.

What if my target can't be reached?+

You'll see a clear warning and the smallest version it managed, so you can decide what to do — allow resizing, choose a smaller format, or pick a bigger target. It never claims a target was met when it wasn't.

What happens to transparency?+

PNG and WebP keep it. JPEG can't store transparency, so transparent areas are filled with the background color you pick.

Should I save as JPEG or WebP?+

WebP is usually noticeably smaller than JPEG at the same visual quality and also keeps transparency, and every current major browser shows it. Choose JPEG when the file is going somewhere that only accepts .jpg — many upload forms, older software and some email clients.

How low will the quality go?+

For JPEG and WebP the tool tries quality 92 first and searches down to 30 at the lowest, keeping the highest quality that fits your target. The quality it settled on is shown next to each result (for example q74). If even 30 is too big, it shrinks the dimensions instead of going lower.

Can I compress many images at once?+

Yes — up to 50 JPG, PNG or WebP files, 40 MB each. They all use the same target size and settings, and you can download them one by one or together as a ZIP. Each file name ends with its new size, like photo-98kb.jpg.

What if my image is already under the target size?+

It's kept exactly as it is — same file, same quality, and any metadata it had. It's only re-encoded if you also change the format or set a max width or height that it exceeds.

Can I set a maximum width and height too?+

Yes. Max width and Max height are optional: larger images are scaled down to fit inside them, keeping their shape, before the target-size search. Images are never enlarged.

Are my images uploaded?+

No. They're decoded and re-encoded in a background worker in your browser. Photo orientation is applied, and EXIF details such as camera and location aren't copied into the new file. (A file that's already under the target and kept unchanged keeps its original metadata.)