🗜️

Image Compressor

Shrink JPG, PNG, or WebP images to a smaller file size.

🔒 Runs entirely in your browser — your image is never uploaded.

Drag & drop an image here, or click to browse

    How Image Compressor works

    How does the image compressor actually work?

    It draws your image onto an HTML <canvas> and then re-encodes that canvas with canvas.toBlob(), passing your chosen quality value (0.1 to 1) as the third argument. For JPG and WebP output this quality number controls the lossy compression the browser's own image encoder applies; PNG output ignores it entirely because PNG is lossless. Switching to a non-PNG format also fills a white rectangle behind the image first, since JPG and WebP exports from canvas drop any transparency.

    When would I actually use this instead of just re-saving the file?

    It's useful when you have a large photo or screenshot and need to shrink the file size before emailing it, uploading it to a form with a size cap, or adding it to a web page. Because you can watch the before/after size update live as you drag the quality slider, it's easy to find the smallest file that still looks acceptable rather than guessing.

    Does the image get uploaded anywhere, and is there a catch?

    No — the whole thing happens with canvas calls in your browser tab; the file never touches a server. The one catch worth knowing is that "compressing" a PNG at high quality can sometimes produce a larger file than the original, since re-encoding isn't always more efficient than the source file's own compression — the tool flags this on screen when it happens so you know to lower the quality or pick JPG/WebP instead.