Image Compressor
Compress JPG, PNG, or WebP by quality slider or target file size in KB, and convert format freely. Runs entirely in your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Lower quality → smaller file. Has no effect on PNG output.
Sample image — choose your own file to replace it.
How it works
- Choose a JPG, PNG, or WebP image.
- Pick an output format (or keep the original), and choose whether to compress by quality slider or by a target file size in KB.
- Compare the original and compressed file sizes side by side.
- Click Download compressed image to save the result.
How compression works
For JPG and WebP, the quality slider controls how aggressively the encoder discards
fine detail when it re-compresses the pixel data — higher quality keeps more detail
and produces a larger file, lower quality throws away more detail for a smaller file.
The image is drawn onto an off-screen canvas at its original resolution, then the
browser's own encoder (canvas.toBlob())
re-encodes it at the chosen quality — the same process a photo editor uses when you
"export as JPG at 80% quality".
FAQ
Is my image uploaded anywhere?
No. The image is decoded and re-encoded locally in your browser using the Canvas API — it never leaves your device.
Which formats are supported?
JPG, PNG, and WebP. The compressed file keeps the same format as the one you uploaded.
Why does the quality slider not shrink my PNG much?
PNG is a lossless format, so the quality value is ignored for PNG output — file size mostly depends on the image itself. For a bigger size reduction on photos, use a JPG or WebP original, or convert to WebP first.
Will the image dimensions change?
No — only the file size changes. Width and height stay exactly as they were in the original.
What quality setting should I use?
80-90% is usually visually identical to the original with a real size saving. Go lower (40-60%) if you need the smallest possible file and can accept some visible compression artifacts.
Can I hit an exact file size instead of guessing a quality value?
Yes — switch "Compress by" to Target file size, enter a size in KB, and it searches for the highest quality that still fits under that size. This only applies to JPG and WebP output; PNG ignores quality entirely, so target size falls back to the quality slider for PNG.
Can I convert between formats while compressing?
Yes — the Output format selector lets you pick JPG, PNG, or WebP regardless of what you uploaded, instead of always keeping the original format.
Does this remove EXIF or GPS data from photos?
Yes, as a side effect of how it works: the image is drawn onto a canvas and re-encoded from pixel data alone, which has no concept of metadata — EXIF, camera info, and GPS location are not carried over to the compressed file.
How we compare
| Feature | Online Tool Store | TinyPNG | Squoosh |
|---|---|---|---|
| No file upload — runs in your browser | ✓ | ✗ | ✓ |
| No sign-up | ✓ | ✓ | ✓ |
| Adjustable quality slider | ✓ | Automatic only | ✓ |
| Compress to a target file size (KB) | ✓ | Not offered | Not offered |
| Convert output format on the fly | ✓ | ✓ | ✓ |
TinyPNG and Squoosh are both capable compressors, but TinyPNG processes your image on its servers with no manual quality control, and Squoosh is a heavier, more technical tool aimed at developers. If you want a quick manual quality slider with your image staying on your device, Image Compressor gets you there in one step.