Compress Images to a Target Size (JPG, WebP, PNG)

Shrink JPG, WebP and PNG files with a quality slider, a live before and after preview, or a target size like 200 KB. Batch and ZIP in your browser.

Runs in your browser. Nothing is uploaded.

Images & PDF

Image Compressor

Images and settings

Up to 100 files · Max 50MB each

Applies to JPEG, WebP and AVIF. Lower is smaller.

Canvas cannot make a lossless PNG smaller, so PNG shrinks by reducing colours. Flat graphics and screenshots keep their look; photos and gradients can show banding.

Used only when a transparent image is written as JPEG.

Images are decoded and written again by your browser, so EXIF data (camera, date, GPS) and colour profiles are not copied into the result. If re-encoding would not make a file smaller, you get the original back unchanged.

Result

Choose images to see a live before and after preview, then compress them all at once and download a ZIP.

Example

Input
IMG_2041.jpg (4000 x 3000 px), target size 200 KB
Result
IMG_2041-compressed.jpg at the highest quality that fits 200 KB, reduced in pixel size only if quality alone cannot reach it. Original and new size are shown.

Three ways to set the size

The quality slider is the direct control: lower values give smaller files and more visible artefacts. The preview above the results re-encodes one of your images as you move the slider, so you see the real output and its exact size rather than a guess. Pick the image to preview from the list when you load several.

Target size mode is for upload forms that demand a limit such as 200 KB. The tool encodes at the best quality first, then at a low one, and then searches between them for the highest quality that fits. If even the lowest quality is too big it shrinks the pixel dimensions in 15% steps and repeats. If the limit still cannot be reached, you get the smallest result and a note saying so. The third lever is the maximum size option: a 4000 pixel photo shown on a 1280 pixel wide page wastes most of its pixels.

How PNG is handled honestly

A canvas can only write PNG losslessly, and re-encoding an already optimised PNG usually saves nothing. So PNG compression here works the way dedicated PNG optimisers do: the image is reduced to a palette of 256, 128 or 64 colours and written as an indexed PNG with transparency preserved. Flat graphics, screenshots and logos usually keep their look and shrink a lot. Photographs and smooth gradients can show banding, which is why you should compare the preview before downloading.

If compressing a file would not make it smaller, for example a PNG that is already tiny, you get the original file back unchanged and the row says so. For photos, converting PNG to WebP or JPEG is normally a far bigger saving than any PNG setting, so try the output format option too.

What happens to your files

Everything runs in your browser, one image at a time, with a ZIP download for batches and a total before and after size for the whole run. Images up to 50 MB and 64 megapixels are accepted, and up to 100 files per run. The browser decodes each file, applies its EXIF orientation, redraws it and writes a new file, so the output does not contain the original EXIF data, GPS position or colour profile. That is a consequence of re-encoding, so check the output if you rely on it.

Repeated lossy compression degrades quality, so always compress from the original file, not from an already compressed copy. Colours can shift slightly for images with a wide-gamut profile because the result is plain sRGB. Animated GIFs are reduced to their first frame.

Frequently asked questions

How do I compress an image to under 200 KB?

Turn on the target size option, enter 200 KB and press Compress. The tool finds the highest quality that fits and reduces the pixel size only if it must.

Is the compression lossy?

JPEG, WebP and the PNG colour-reduction mode are lossy. The preview shows the actual result before you download. The lossless PNG option rarely saves anything.

Why did I get my original file back?

When re-encoding would produce a larger or equal file at the same format and size, the original is returned unchanged rather than making things worse.

Is the EXIF data kept?

No. Files are redrawn and re-encoded, so EXIF, GPS and embedded colour profiles are not copied into the result.

Are my images uploaded?

No. All processing happens locally in your browser tab.

Related tools