Image compressor
Batch-compress JPG, PNG and WebP locally by quality, dimensions or a target size in KB
Drop or choose images to compress them immediately. Changing quality, longest side or target KB recalculates automatically; then download single files or a ZIP.
| File | Original | Result | Change | Actions |
|---|
Comparison
Example
Input
sample.png (generated, 1200×800) · quality 80 · output WebP
Example result
sample-min.webp · 1200×800 · the table lists original bytes, result bytes and the percentage change
The sample is drawn locally by the page. The actual ratio depends on the image content and the browser's encoder; photos usually compress further than icons or screenshots.
Technical details & limits
Images are decoded with the browser's createImageBitmap, rotated according to EXIF orientation, then re-encoded with Canvas toBlob, so EXIF, GPS and similar metadata are not written to the output. Quality applies to JPEG, WebP and AVIF only; PNG is lossless, so re-encoding usually changes its size little. Target-size mode runs up to 7 binary-search rounds between 5% and the current quality. Downscaling by more than 2x halves the image in steps to reduce aliasing. Encoders come from the browser, so identical settings can produce different sizes in different browsers.
About this tool
Batch-compress JPEG, PNG, WebP and other images locally in your browser. Adjust quality, cap the longest side, let the tool search for a quality that meets a target size, or output WebP or AVIF directly. Each image lists its size, dimensions and change before and after, with a drag-to-compare preview, single downloads and a ZIP bundle. Images are never uploaded.
How to use
- Drop, choose or paste images (up to 30 at a time); compression starts immediately.
- Adjust output format, quality, longest side or target size as needed; results recalculate automatically.
- Check quality in the comparison preview, then download single files or a ZIP.
Input & output
- Input
- JPEG, PNG, WebP, AVIF, BMP and GIF (first frame only); up to 30 files, each at most 50 MB, 50 megapixels and 16,384 px per side.
- Output
- JPEG, WebP, AVIF or PNG files, downloadable one by one or as a ZIP.
- Limits
- AVIF output depends on browser support; animation and metadata are not kept; a target size cannot always be reached.
Notes
Everything runs in the current tab; results are lost when the page is refreshed or closed. Large batches use a lot of memory, so split them if needed.
FAQ
- How do I compress an image to under 200 KB?
- Enter 200 in the target size field. The tool then runs up to 7 binary-search rounds between 5% and your current quality and keeps the highest quality that stays within 200 KB. If even the lowest quality is still too large, also limit the longest side, for example to 1920 pixels, or switch the output to WebP, which is often smaller than JPEG at similar visual quality, and try again.
- Why does a PNG barely shrink, or even grow, after compression?
- PNG is lossless, so re-encoding in the browser keeps every pixel and the size usually changes very little. With the default option to keep the original when the result is larger, a same-format, same-size result never replaces a smaller original. For a clearly smaller file, switch the output to WebP at quality 80, or cap the longest side at 1600 pixels; both reduce the data that has to be stored.
- Will compressed photos lose EXIF and GPS location data?
- Yes. Each image is re-encoded through Canvas, so EXIF fields, GPS coordinates and camera settings are not written to the new file, and orientation is applied to the pixels first. Only when the original is kept, because the result was larger, do you download the untouched source file. All processing happens on your device with 0 bytes uploaded, and each file may be up to 50 MB.
Related tools