AyeCalc
All tools
Image tools

Free Image Compressor Online

Reduce image file sizes without sending them to a server. Choose a quality level or a best-effort target size for JPEG and WebP, compare source and result sizes, and keep successful files from a partial batch.

Quality and target sizeBefore/after comparisonPrivate batch compression
Private image compressor

Reduce image file sizes

Images stay local
Drop images here

JPEG, PNG, or WebP · up to 10 files, 100 MB each, and 50 megapixels

Core formulaoutput bytes = browser encoder(image, format, quality)

Target-size mode tests at most seven quality levels and accepts a result within five percent when possible.

01
Method

How the image compressor works

The browser decodes each image, redraws it at its original dimensions, and encodes a new file at the selected quality. Target-size mode searches progressively lower quality values for the closest usable JPEG or WebP result.

Formulaoutput bytes = browser encoder(image, format, quality)

Target-size mode tests at most seven quality levels and accepts a result within five percent when possible.

02
Worked example

Compress a 1.8 MB JPEG toward a 300 KB target

The tool first encodes at the selected maximum quality. If that result is too large, it tests lower quality levels, keeps the closest result below the target when available, and warns when the requested size cannot be reached.

03
Output

Using the processed image

Keep the exported dimensions, format, transparency, and compression level appropriate for where the image will be used.

JPEG quality
canvas.toBlob(handleBlob, "image/jpeg", 0.8);
WebP quality
canvas.toBlob(handleBlob, "image/webp", 0.8);
04
Practical guidance

Using the result accurately

Compare detail around text, hair, gradients, and high-contrast edges rather than relying only on byte size. WebP is often useful for web delivery, while JPEG remains broadly compatible for opaque photographs.

Important limitation

A requested byte size is not guaranteed because image complexity and browser encoders differ. PNG quality is lossless and does not use the quality slider, and re-encoding can occasionally create a file larger than its source.

References: MDN HTMLCanvasElement toBlob().

Common questions

Image Compressor FAQ

Answers about the method, assumptions, and practical use.

Can I compress an image to an exact KB size?

The target is best-effort. The tool tries up to seven JPEG or WebP quality levels and reports when the image cannot reach the requested size without going below the minimum quality.

Why does PNG not have the same quality control?

Browser canvas PNG output is lossless, so its encoder does not use the lossy quality value available for JPEG and WebP.

Are compressed images uploaded?

No. The images are decoded and re-encoded in browser memory. Batch ZIP creation also happens locally after you request it.

Does compression remove image metadata?

Yes. Generated files omit EXIF and other embedded metadata, including camera or location information that may have been present in the source.