Compress JPG, PNG, or WEBP to a target file size — runs entirely in your browser, nothing uploaded.
Supports JPG, PNG, WEBP
This tool compresses images directly in your browser using the HTML5 Canvas API. No files are ever uploaded to a server — compression happens entirely on your device. It works by encoding the image at progressively lower quality levels using a binary search algorithm until the output falls within a few percent of your target file size.
JPEG and WEBP are lossy formats — they discard visual information that is hard for the human eye to perceive. The compression quality parameter (0–100) controls how aggressively data is discarded. Lower quality = smaller file but more visible artefacts. PNG is lossless and cannot be compressed the same way; PNG size reduction works by optimizing the internal compression dictionary rather than discarding data.
For photographs, JPEG quality 75–85% is virtually indistinguishable from the original at normal viewing distances. Quality 60% is acceptable for web use where page speed is the priority. Below 50%, artefacts become visible. WEBP achieves similar quality at about 25–35% smaller file sizes.
No — this tool only changes the file size by adjusting compression quality, not the pixel dimensions. To resize the image (change width/height), use the Image Resizer.
No. All compression runs locally using the browser's Canvas API. Your images never leave your device.
Want more detail? Read How to Compress Images for Web Without Losing Quality.