Compress Image to an Exact KB Size
Need a photo under 50KB for a job portal, or exactly 100KB for a university form? Set the target and this finds the best quality that still fits. Your image is processed by your own browser and never uploaded.
Nothing leaves your device
The result will be as close to this as possible without going over.
JPEG gives the smallest files for photographs.
Compressed size
—
Why an exact size matters
Plenty of forms in Pakistan and across South Asia reject anything over a fixed limit — a passport photo under 50KB, a scanned document under 200KB, a profile picture under 1MB. Most compressors just apply a quality slider and leave you guessing. This one works the other way round: you name the size, and it searches for the highest quality that fits underneath it.
How the search works
JPEG and WebP quality settings do not map linearly to file size, and the relationship differs for every image. So rather than guessing, the tool runs a binary search: it encodes the image at a mid-range quality, checks the resulting byte count, and narrows the range from there. About ten passes are enough to land within a fraction of a percent of the ceiling.
If the target is so small that even the lowest usable quality overshoots — common when you ask for 20KB from a 12-megapixel photo — the tool starts scaling the pixel dimensions down in steps and repeats the search at each size. That is what the "reduce dimensions" option controls.
PNG is lossless, so it has no quality dial to turn. For a PNG target the tool can only reduce dimensions. If you need a small file and do not need transparency, JPEG will get you much further.
Frequently asked questions
Is there a watermark or a file limit?
Neither. There is no server to impose limits and no business model that requires a watermark. Process as many images as you like.
Does it work offline?
Once the page has loaded, yes. Turn off your connection and compress away — the work happens in your browser's canvas engine, not on a server.
Will compressing hurt the photo?
JPEG and WebP are lossy, so some detail is discarded. Because the tool always picks the highest quality that fits your target, the loss is the minimum needed to meet the limit you set. Compare the two previews before downloading.
Does it keep EXIF data such as location?
No. Re-encoding through the canvas drops EXIF metadata, including GPS coordinates and camera details. For uploading photographs to public forms, that is usually an advantage.