Image Compressor
Compress images directly in your browser. No upload, no server — your files never leave your device.
| Original size | — |
| Compressed size | — |
| Original dims | — |
| Output dims | — |
| Output format | — |
How to Use
Drop an image or click the upload area to select a file from your device. Adjust the quality slider to control compression strength — lower values produce smaller files with more visible compression. Choose an output format or keep the original. Optionally set a maximum width to resize large images.
For precise control, enter a target file size in KB and click "Auto-fit to target." The tool will automatically find the best quality setting to hit your target size using a binary search algorithm — all within your browser in under a second.
Switch to Batch Mode to compress multiple images at once. Each image is processed with the same settings and can be downloaded individually or all at once.
Choosing the Right Format
The output format you choose affects both file size and compatibility. JPEG works best for photographs and complex images with many colors. PNG preserves transparency and is ideal for logos, icons, and graphics with sharp edges. WebP offers the best of both worlds — smaller files than JPEG with support for transparency like PNG. If you are unsure, WebP is a safe default for most use cases. You can always switch formats and compare the results side by side before downloading.
Before & After Comparison
In single image mode, a visual comparison slider lets you see the original and compressed images side by side. Drag the blue handle left or right to reveal the difference. This helps you find the right balance between file size and visual quality — especially useful when optimizing images for websites or social media.
Target File Size
Many platforms have upload limits — for example, "profile photos must be under 2 MB" or "email attachments under 500 KB." Instead of guessing the right quality percentage, just type the target size and let the tool figure it out. It runs a binary search over quality values, testing each against your target until it finds the largest quality that fits.
Why WebP?
WebP is a modern image format developed by Google that provides superior compression compared to JPEG and PNG. A typical JPEG image can be 25–35% smaller as WebP with no visible quality loss. All modern browsers — Chrome, Firefox, Safari, and Edge — support WebP. If you're optimizing images for the web, WebP is the recommended format.
Privacy
Everything happens in your browser. Your images are never uploaded to any server. The compression uses the HTML5 Canvas API built into your browser, so even if your internet connection drops after loading the page, the tool keeps working. No data ever leaves your device.
Read the story behind this tool: Why I Built a Browser-Based Image Compressor