Free tools for developers

Image Compressor

Compress JPG and PNG images directly in your browser. No file is uploaded to any server. Adjust quality and download instantly.

🖼️
Click to upload or drag and drop

Supports JPG and PNG. File stays in your browser.


How Image Compression Works

This tool uses your browser's built-in Canvas API to redraw the image at a lower quality setting. For JPG images, lowering the quality removes fine detail that is barely visible to the human eye but takes up a lot of file space. For PNG images, resizing reduces the pixel count which directly reduces file size.

Most images taken on phones or cameras are far larger than what websites need. A photo taken on a modern phone might be 5MB or more. For a website, the same image at 200KB looks nearly identical on screen but loads 25 times faster. This matters for page speed which directly affects both user experience and Google rankings.

How to Use This Tool

  1. Click the upload area or drag and drop your image file.
  2. Adjust the quality slider. 70 to 80 percent is a good starting point for most images.
  3. Adjust the max width if you want to resize the image as well.
  4. Click Compress to apply and see the result side by side.
  5. Click Download to save the compressed image.

What Quality Setting Should I Use?

For photos with lots of colour and detail, 70 to 80 percent quality looks identical to the original at normal viewing sizes but cuts file size by 50 to 70 percent. For images with text or sharp edges, use 85 to 90 percent to avoid visible compression artefacts. For thumbnail images that will be shown small, you can go as low as 50 to 60 percent.


Frequently Asked Questions

Is my image uploaded to a server?

No. Your image never leaves your device. Everything is processed using your browser's Canvas API. This makes it completely private and works even without an internet connection once the page loads.

What is the difference between lossy and lossless compression?

Lossy compression removes some image data to achieve smaller file sizes. The quality loss is often invisible at moderate settings. Lossless compression reduces file size without removing any data but achieves smaller reductions. This tool uses lossy compression via the Canvas API quality setting.

Why is the compressed PNG larger than the original sometimes?

PNG compression works differently from JPG. If the original PNG was already well optimised, re-encoding it through Canvas can sometimes make it slightly larger. In that case try converting it to JPG format instead which typically achieves much better compression for photos.

Is there a file size limit?

No hard limit. Since everything runs in your browser the only limit is your device memory. Very large images above 20MB may be slow to process on older devices.