Compress Image to Size

Pick a target file size or enter your own, and we'll search for the highest quality that fits — free, private, and processed entirely in your browser.

About Compress Image to Size

Many forms, portals, and upload fields cap file size at an exact limit — a passport photo under 100 KB, a document scan under 200 KB, a profile picture under 1 MB. Getting there by trial and error with a quality slider wastes time and often overshoots.

Our free online tool does that search for you: pick a target size and it repeatedly re-encodes your JPG, PNG, or WEBP photo — adjusting quality first, and dimensions only if needed — until it finds the highest-quality version that fits under your target, entirely inside your browser. Nothing is ever uploaded to a server.

How to Compress an Image to a Target Size

  1. Step 1

    Upload your photo

    Drag and drop a JPG, PNG, or WEBP image, or choose one from your device.

  2. Step 2

    Pick a target size

    Choose a preset like 100 KB, or enter your own custom target in KB or MB.

  3. Step 3

    Compress and download

    Click "Compress to Target Size & Download" to get the smallest file at the highest possible quality.

Frequently Asked Questions

How does it hit an exact target size?

The tool runs a binary search over the image's compression quality and, if needed, its dimensions, re-encoding it repeatedly until it finds the highest quality that still fits under your target size.

What if my target is too small for the image to reach?

The tool gets as close as possible using the lowest quality and smallest scale available, and lets you know the result couldn't fully reach your target without becoming unusable.

Is my photo uploaded to a server?

No. Every compression attempt runs locally in your browser using the HTML5 Canvas API — your photo is never uploaded anywhere.

Does it cost money?

No. Compressing an image to a target size is 100% free, with no registration or account required.

Related Tools