Image Compressor

Select an image, drag the quality slider, and download the compressed result. Everything happens on your device — nothing is uploaded or stored anywhere.

How Image Compressor Works

This tool re-encodes an image at a lower quality setting to shrink its file size, entirely inside your browser using the HTML5 Canvas API. Your photo is drawn to a canvas and exported as a new JPG or WebP file at the quality level you choose -- nothing is ever uploaded to a server, so it works offline and keeps your images private.

Formula & Method

Moving the Quality slider (1–100) controls the compression level passed to the browser's built-in canvas export function for JPG or WebP. Lower quality values discard more visual detail in exchange for a smaller file, while higher values keep more detail at a larger size. The result panel reports the size reduction as (1 − compressed size ÷ original size) × 100 -- so if a 2,400 KB original compresses down to 620 KB, that's a reduction of (1 − 620/2400) × 100 = 74.2%, shown as −74.2% vs. the original.

Worked Example

Say you load a 2,400 KB JPG photo and choose the JPG output format at quality 70. The exact resulting file size depends on the image's own content (a busy, detailed photo compresses less than a simple, flat-color graphic), but the tool always reports the size change using the same formula: if that compression happens to produce a 620 KB file, the panel would show −74.2% vs. original, alongside the original size, compressed size, and the image's pixel dimensions (which compression alone does not change).

Frequently Asked Questions

Does compressing an image change its width and height?
No -- this tool only changes quality/compression, not dimensions. The pixel dimensions shown in the result stats stay the same as the original; use the Image Resizer if you also need to change width or height.
Which format compresses smaller, JPG or WebP?
WebP generally produces a smaller file than JPG at a visually similar quality level, since it uses a newer, more efficient compression algorithm. JPG remains the safer choice if you need maximum compatibility with older software.
Are my images uploaded anywhere?
No. The entire compression process runs in your browser using the Canvas API -- the image file never leaves your device or gets sent to a server.
Why did the compressed file end up larger than the original?
This can happen if the original file was already efficiently compressed (or in a format like PNG that isn't optimized for photos) and you pick a high quality setting -- re-encoding adds its own overhead. If that happens, the result panel flags it with a plus sign and marks the value as a negative outcome rather than a saving.
Select an image to get started