Skip to tool
ecech.
🖼️ Image & Photo Tools

Free Image Compressor That Hits an Exact File Size Like 100KB or 2MB

Type the limit the upload form gave you and the tool searches for the highest quality that fits under it — no guessing at percentages, and nothing ever leaves your device.

Advertisement

How the calculation works

How it finds the best quality that still fits quality 0 quality 100 50 → 180KB too big, go lower 25 → 78KB fits, try higher 37 → 96KB 43 → 99KB best fit found Each step halves the remaining range, so eight encodes are enough to land within a percent of the limit.

How to Use This Tool

Upload forms give you a hard limit and no help meeting it. "Photo must be under 100KB" is a common requirement on job applications, visa portals, government forms and school systems, and the usual response is to compress at 60%, check, compress again at 40%, check again. This tool does that search for you and lands on the highest quality that still fits.

How to use it

Choose a photo or drag one onto the box. Enter the limit you were given and pick the unit. Press Compress. Within a second or two you get a side-by-side comparison, the actual resulting size, and the quality setting that produced it.

Leave shrink dimensions ticked. Quality reduction alone cannot always reach a small target — a 12-megapixel phone photo simply cannot become 50KB at any JPEG quality without turning to mush. When quality alone is not enough, the tool reduces the pixel dimensions in steps and retries, which produces a far better-looking result than crushing the quality to single digits. The stats panel tells you whether it had to do this and what size it settled on.

Two ways to get a 4000×3000 photo down to 100KB Quality only 4000×3000 at quality 8 blocky artefacts everywhere, faces smeared, text unreadable looks broken Dimensions first 1200×900 at quality 72 clean edges, readable detail, still larger than most forms display looks fine
Same file size, very different result. Pixels you cannot see cost bytes; artefacts you can see cost credibility. That is why the tool reduces dimensions before it destroys quality.

Which output format to pick

JPEG is the safe default. Every upload form, every printer and every twenty-year-old system accepts it. WebP typically reaches the same visual quality at 25–35% smaller, which means a higher quality setting for the same target — but some government portals and older software still reject it. If the form says "JPG or PNG", use JPEG.

Note that both are lossy. If your source is a PNG screenshot with sharp text, compressing it as JPEG will introduce fringing around the letters. For that kind of image, WebP is noticeably better, and reducing the dimensions is better still.

Two things worth knowing

  • Metadata is removed. Re-encoding through a canvas discards EXIF, which means the GPS coordinates and camera details in the original are gone from the output. For an upload form that is a privacy improvement rather than a loss.
  • Nothing is uploaded. The file is read by your browser and processed in memory. There is no server involved, which is why it works on aeroplane wifi and why you can safely compress a passport photo or a medical document here.
Advertisement

Frequently Asked Questions

How do I compress a photo to exactly 100KB?
Enter 100 KB as the target and press Compress. The tool runs a binary search across the quality range, encoding the image several times, and keeps the highest quality whose output lands under your limit. It typically finishes within eight attempts and gets within a percent or two of the target.
Why does it reduce the dimensions as well as the quality?
Because quality reduction alone cannot always reach a small target. A 12-megapixel photo has too much data to fit in 50KB at any usable quality setting — you would end up with visible blocking. Reducing dimensions first and keeping quality high produces a far better looking file at the same size.
Is my photo uploaded to a server?
No. The file is read by your browser using the FileReader API and compressed on a canvas in memory. No network request is made at any point, which is why this works offline and why it is safe for passport photos, medical documents and anything else you would rather not hand to a stranger's server.
Does compressing remove EXIF and GPS data?
Yes, as a side effect. Canvas re-encoding produces a fresh file with no metadata, so the location, camera model and timestamp from the original are not carried through. For uploading to a form that is usually a benefit, but if you need the metadata preserved, keep the original.
Should I choose JPEG or WebP?
JPEG unless you know the destination accepts WebP. WebP reaches the same visual quality at roughly 25 to 35% smaller, which means less compression damage for the same target size. But some government portals, older software and some print services still reject it outright.
Why is my compressed file slightly over the limit?
It should not be — the search only accepts results under your target. If you are seeing a larger file, check whether the form measures in KB as 1024 bytes or 1000 bytes. This tool uses 1024, which is the stricter interpretation, so a file that passes here will pass either way.
Can I compress PNG without losing quality?
Not through a browser canvas, which only offers lossy JPEG and WebP re-encoding. True lossless PNG optimisation requires a different algorithm. If your image is a screenshot or has flat colour, reducing its dimensions or converting to WebP will usually save far more than lossless PNG tools would anyway.

Related tools in Image & Photo Tools

Browse all Image & Photo Tools tools