Compress image to a specific size
Pick the ceiling you have been given. Each page below opens the compressor with that target already set.
Every target, with what it costs you
The table lists every target, the exact byte count it corresponds to, and the rough pixel budget a typical photograph has at that size. Use it to sanity check a limit before you fight with it: if a form wants 20KB and you are trying to send a twelve megapixel photo, no encoder is going to make that look good, and the real answer is to resize first.
| Target | Bytes | Comfortable resolution | Best format |
|---|---|---|---|
| 10KB | 10,240 bytes | ~360 × 240 | JPG |
| 15KB | 15,360 bytes | ~440 × 290 | JPG |
| 20KB | 20,480 bytes | ~510 × 340 | JPG |
| 25KB | 25,600 bytes | ~570 × 380 | JPG |
| 30KB | 30,720 bytes | ~620 × 410 | JPG |
| 40KB | 40,960 bytes | ~720 × 480 | JPG |
| 50KB | 51,200 bytes | ~800 × 530 | JPG |
| 100KB | 102,400 bytes | ~1130 × 750 | JPG |
| 150KB | 153,600 bytes | ~1390 × 920 | JPG or WebP |
| 180KB | 184,320 bytes | ~1520 × 1010 | JPG or WebP |
| 200KB | 204,800 bytes | ~1600 × 1070 | JPG or WebP |
| 250KB | 256,000 bytes | ~1790 × 1190 | JPG or WebP |
| 300KB | 307,200 bytes | ~1960 × 1310 | JPG or WebP |
| 500KB | 512,000 bytes | ~2530 × 1690 | JPG or WebP |
| 1MB | 1,048,576 bytes | ~3620 × 2410 | WebP or PNG |
| 2MB | 2,097,152 bytes | ~5120 × 3410 | WebP or PNG |
| 5MB | 5,242,880 bytes | ~8100 × 5400 | WebP or PNG |
| 8MB | 8,388,608 bytes | ~10240 × 6830 | WebP or PNG |
| 10MB | 10,485,760 bytes | ~11450 × 7630 | WebP or PNG |
| 20MB | 20,971,520 bytes | ~16190 × 10790 | WebP or PNG |
| 25MB | 26,214,400 bytes | ~18100 × 12070 | WebP or PNG |
Kilobyte here means 1024 bytes, which is what upload validators almost always mean too. A form that says "maximum 100KB" is nearly always checking against 102,400 bytes rather than 100,000. Where a system does use the decimal definition the difference is under two and a half percent, comfortably inside the margin you should be leaving anyway.
Why compress to a specific size at all
Because the systems that impose these limits do not negotiate. A visa portal that wants 200KB rejects 201KB without telling you which field was wrong. A recruitment site that wants 100KB silently truncates the upload. The number is the requirement, and a quality slider that leaves you guessing how many kilobytes you will get is the wrong instrument for meeting it. The instrument you want lets you compress image to a specific size and tells you the byte count it actually reached.
Working backwards from the number is also simply more efficient. Rather than exporting at quality 80, checking, exporting at 60, checking again, and eventually settling for something well under the limit because you got tired of iterating, the search converges in under a second and lands as close to the ceiling as it can. Closer to the ceiling means more of your detail survives.
The targets below are not arbitrary either. Each one is a limit that real systems actually enforce — identity document portals cluster around 20KB to 200KB, job boards and CMS uploaders around 1MB to 5MB, chat apps between 8MB and 25MB. Starting from the number you were given and working down is faster than starting from your file and hoping. Pick the closest target, compress image to a specific size, and check the result against whatever gave you the limit in the first place.
Every file stays on your device
Nothing you drop onto this page leaves your device. The image is decoded, re-encoded and handed back entirely inside the browser tab. There is no upload, no queue, and no temporary copy sitting on someone else's disk waiting for a retention policy to delete it.
That matters more than it sounds. The files people most often need to shrink are the ones they should be most careful with: passport scans, signatures, identity documents, medical forms. Handing those to an unknown server in exchange for a smaller file is a poor trade. Because the work is local, you can compress image to a specific size with the network disconnected and get the same result.
It also means there is no queue to wait in and no daily allowance to run out of. Server-side compressors have to ration free use because every file costs them CPU time; here the CPU is yours, so you can compress image to a specific size as many times as you like, on as many files as you like, without an account.