PixPipePixPipe
100% Client-Side • Images never leave your device

Compress Image to Exact Size

Set a target file size and we will find the perfect quality. Binary search algorithm, 100% in your browser.

🎯

Drop an image here or click to upload

Supports PNG, JPG, WebP

Features

Precise Size Targeting

Enter any target size in KB or MB. The binary search algorithm iterates to find the exact quality level that hits your target — no more guessing.

100% Browser-Based

All compression happens locally on your device using Canvas. No files are uploaded to any server. Your images stay private.

Flexible Output

Choose between JPG and WebP output formats. Use quick presets for common limits like 100KB, 500KB, or 2MB, or set any custom target.

FAQ

How does the target size compression work?+
The tool uses a binary search algorithm on the Canvas quality parameter (0.01 to 1.0). It iteratively tests quality levels to find the one that produces a file size closest to your target without exceeding it.
What if my target size is too small?+
If the target size cannot be reached even at the lowest quality setting, the tool will show you the smallest achievable size and let you download that result.
Is my image uploaded to a server?+
No. Everything runs in your browser using the HTML5 Canvas API. Your image never leaves your device. This also means the tool works offline after the page loads.
Which output format should I choose?+
WebP generally achieves smaller file sizes at the same quality compared to JPG. However, JPG has wider compatibility with older systems and websites. Choose based on where you plan to use the image.
What is the maximum image size supported?+
The tool supports any image your browser can load. Very large images (50+ megapixels) may be slow to process depending on your device. There is no file size limit since nothing is uploaded.

More Free Tools