How to Compress Images to an Exact File Size
Set a target KB or MB size, understand why files miss hard limits, and use a browser-local workflow to verify the final output before upload.
Updated: September 29, 2026
Quick answer: Type your KB or MB target instead of guessing quality settings. LessMB iterates quality and dimensions in your browser until the file lands under the limit with a safety margin, and labels unreachable results Target Missed.
Every exact-size tool on the first page of search results has the same catch: your image gets uploaded to their server before it gets smaller. This guide does the same job with the file never leaving your machine. The trick is to stop hunting quality settings by hand and let a solver do the search.
Target Size to Settings: The Cheat Table
These are starting points for a typical photo, verified against common upload limits. A target-size tool starts here and adjusts until the byte count passes.
| Target | Typical use | Starting quality | Max dimension | Expect to crop? |
|---|---|---|---|---|
| 100KB | Signatures, ID photos, avatars | WebP/JPEG 70-80 | 800px | Yes, crop dead space |
| 200KB | Profile photos, small form uploads | WebP/JPEG 75 | 1200px | Usually not |
| 500KB | Form photos, document submissions | WebP/JPEG 75-85 | 2000px | No |
| 1MB | Email attachments, photo sharing | JPEG 80-85 | 3000px | No |
| 2MB | High-detail submissions, zoomable copies | JPEG 85-90 | 4000px | No |
Screenshots and transparent images follow different rules: PNG or WebP at 90+, dimensions preserved, with cropping doing the byte work. Deep dives per size: 100KB, 500KB, 1MB.
Hit Your Target in Three Steps
- Open LessMB and drop the image in. Processing happens in the browser tab; JPG, PNG, WebP, AVIF, and HEIC are all accepted, and nothing uploads.
- Switch to target-size mode and type the limit. For a form that says 500KB, enter 500 KB. The solver then iterates quality, and dimensions only if needed, until the file lands under the target. It reserves a small safety margin so rounding at the form cannot reject you.
- Check the result and download. Verify the reported size against the form's limit and glance at the image at 100% zoom. If the target was mathematically unreachable without wrecking the image, the result is labeled Target Missed rather than passed off as a success.
The whole loop runs in seconds locally, so retrying with a different target costs nothing.
Why Under the Limit Beats Exactly On It
Forms almost always mean "no more than," not "precisely." A 486KB file passes a 500KB limit; padding it to exactly 500.0KB adds quality no one can see and risks rejection. Three details trip people up:
- Units vary. "1MB" can mean 1,000,000 bytes or 1,048,576. A file at 1,010,000 bytes passes one rule and fails the other.
- Labels round. A folder showing "100KB" may be 102,400 bytes. Check exact bytes, not the display.
- Systems re-check. Some forms re-encode uploads; arriving 2-5% under the limit leaves room for their pass.
Exact Size Without the Upload
The files that most often need exact sizes are the ones least suited to uploading: passport and ID scans for application forms, signed documents, client photos for submissions. Handing those to a server-side compressor means a third party holds a copy under a retention policy you have not read.
LessMB's target-size mode runs entirely in the browser. No upload, no account, no watermark, and the same tab also handles videos, PDFs, and ZIP batches if your form mixes file types.
FAQ
Why was my 99KB file rejected? The form likely counts exact bytes, uses a lower ceiling than displayed, or demands a specific format. Check the real byte count and the accepted file types, then re-run the solver with a 5% margin.
Does target-size compression hurt quality more than normal compression? No. It finds the highest quality that fits, which is usually better than manual slider guessing. The difference is that the byte budget, not your eye, sets the stopping point.
Can I batch files to the same target? Yes, but remember each image reaches the target differently: an already-small avatar barely changes while a 12MP photo works hard. ZIP-in, ZIP-out works locally in the same tool.
Related LessMB Guides
Try it now — 100% in your browser
No upload, no sign-up, no watermark. Your files never leave your device.