Compress Image to Exact Target Size — Free Online Tool
Set your target file size in KB or MB. Resizo bisects the encoder quality — and drops the dimensions if it has to — until your image lands just under the number you asked for. Save the result as JPG, WebP, AVIF, PNG or PDF. No upload, no sign-up, no watermark.
Compress to an exact file size
Everything runs on this device. Nothing is uploaded, so nothing can be stored, leaked or scanned.
Drop images here
or — you can also paste with Ctrl + V
JPG · PNG · WebP · GIF · BMP · AVIF — up to 50 images, 60 MB each.
1 KB is read as 1 000 bytes here — the stricter of the two definitions, so the result clears upload forms that use either one.
Each image becomes its own one-page PDF, sized to your target. A4 is what most document-upload portals expect.
One of your images has a transparent background. The format you picked cannot store transparency, so it will be flattened onto white — switch to WebP, AVIF or PNG above if you need to keep it.
Common target sizes and what they are for
If a form told you a number but not why, this is usually the reason behind it.
| Target | Common use case | Typical source | Expect |
|---|---|---|---|
| 10 KB | Signature and thumbnail slots on government portals | Scanned signature | Dimensions will shrink |
| 20 KB | Government ID uploads, passport forms | Phone camera photo | Visible softening |
| 50 KB | Aadhaar, PAN and visa applications | Scanned document | Fine for documents |
| 100 KB | Job portals, university application forms | DSLR photo | Good at web sizes |
| 200 KB | Email attachments, blog thumbnails | Screenshot | Near-identical |
| 500 KB | Social posts, presentation slides | Stock photo | Indistinguishable |
| 1 MB | High-quality web images, print drafts | Professional photo | Indistinguishable |
| 2 MB | Full-resolution photos that must still email | RAW conversion | Indistinguishable |
| 5 MB | Gmail and Outlook attachment ceilings | Multi-shot batch | Indistinguishable |
How to compress an image to an exact size
-
1
Add your image
Drag it in, browse for it, or paste with Ctrl + V. Up to 50 at once.
-
2
Set your target
Type a number and pick KB or MB, or click a chip such as 100 KB.
-
3
Compress and download
Watch each attempt narrow in, then save the file — or a ZIP if you added several.
Hitting an exact file size: what actually happens
How binary-search compression works
No image encoder accepts "make this 100 KB". JPEG and WebP take a quality value between 0 and 1, and the number of bytes that falls out the other end depends entirely on the picture — a flat blue sky at quality 0.6 might be 40 KB while a crowd scene at the same setting is 400 KB. The only way to find the right setting is to try one and measure.
Trying them one at a time is slow. Bisection is not. The tool encodes at the midpoint of the remaining range, checks the result against your target, and throws away the half of the range that cannot possibly contain the answer:
| Attempt | Quality tried | Result | Next range |
|---|---|---|---|
| 1 | 0.95 | 842 KB — too big | 0.02 – 0.95 |
| 2 | 0.02 | 31 KB — fits | 0.02 – 0.95 |
| 3 | 0.49 | 188 KB — too big | 0.02 – 0.49 |
| 4 | 0.25 | 74 KB — fits | 0.25 – 0.49 |
| … | 0.37 | 99 KB — fits | done |
Each attempt halves the search space, so eight encodes pin the best quality to within half a percent. A linear walk would need well over a hundred to do the same, and every one of them costs a full encode of your image.
There is a floor to this. If your target is so small that even quality 0.02 overshoots — 10 KB from a 24-megapixel photo, say — no quality setting can save it, because you are paying for pixels rather than for detail. At that point the tool starts reducing the dimensions instead, estimating the first step from the measurement it already has (bytes track pixel count closely), then re-running the quality search at the smaller size so the picture claws back everything the shrink paid for.
Compression vs. resizing: what is the difference?
They are two different levers and they fail in different ways. Resizing changes the pixel dimensions — 4000×3000 becomes 1200×900 — and you lose detail you could only have seen by zooming in. Compressing keeps every pixel but stores them less precisely, and you lose detail you would only notice by looking closely: blocking around hard edges, mottling in smooth gradients.
For a fixed byte budget there is a trade between them, and which one to spend first depends on what the image is for. A passport photo that will be printed at 35×45 mm should keep its quality and lose pixels. A web hero image that will be displayed at 1200 px wide should lose the pixels it will never show, then keep as much quality as the budget allows. That is what the Priority control does — it decides which lever the search pulls first.
Why your 100 KB might not be their 100 KB
"KB" means two different things depending on who wrote the upload form. Some
validators check size <= 100000
(decimal), others size <= 102400
(binary, which is what Windows shows you in Explorer). A file that satisfies the second can fail the
first, and the form will usually just say "file too large" without explaining which one it meant.
This tool reads your target the strict way — 1 KB = 1 000 bytes — and aims a little under that. The result clears both kinds of validator, at the cost of a fraction of a percent of quality you were never going to see.
Which output format should you pick?
Five are offered, and the choice matters more as the target gets tighter — at 500 KB they all look the same, at 20 KB they do not.
| Format | How it hits the target | Pick it when |
|---|---|---|
| JPG | Quality bisection | Anything going to someone else's upload form. The safe default. |
| WebP | Quality bisection | A website you control. 25–35% fewer bytes than JPG for the same appearance. |
| AVIF | Quality bisection | The smallest possible file, and you can wait. Often half of JPG. |
| PNG | Dimensions only | You need a pixel-exact copy or real transparency. |
| Quality of the embedded JPEG | A portal asking for a document under a size cap. |
For the three lossy formats the catch is acceptance, not support. Every current browser reads WebP and AVIF, but plenty of government portals, older recruitment systems and print shops still reject the extensions outright. The rule of thumb: WebP or AVIF for anything that ends up on a website you control, JPG for anything you are handing to someone else's form. JPG is the default here for exactly that reason. AVIF is also much slower to encode — the first image downloads a one-time encoder — so it suits a handful of images rather than a batch of fifty.
PNG behaves differently from the rest. It is lossless, so there is no quality dial to turn and the only way to make it smaller is to remove pixels. The tool therefore searches the dimensions instead, and the Priority control disappears because there is no quality left to prioritise. Expect a small target to shrink a PNG hard — 20 KB of lossless photo is roughly a 90-pixel-wide picture. If you want to keep the original dimensions of a PNG and simply make the file smaller, the PNG compressor is the better page. Choosing a lossy format for an image with a transparent background is flagged before anything is flattened onto white.
Why browser-based compression is more private than cloud tools
Most "compress to 100 KB" sites work by uploading your file, compressing it on a server and sending it back. That means a copy of your passport scan, your salary slip or your child's school photo exists on somebody else's disk, covered by whatever their retention policy happens to say this month.
Resizo has no backend that receives images. The search runs in your tab using the browser's own canvas encoder, which is the same code path your phone uses to save a photo. Two ways to confirm it: open the Network panel in your browser's developer tools and watch that nothing is sent while you compress, or simply disconnect from the internet after the page has loaded and compress anyway — it still works.
A useful side effect: re-encoding drops EXIF metadata, so GPS coordinates, camera serial numbers and timestamps do not travel with the compressed copy. That is usually what you want when a file is going to a stranger. If you need the metadata, keep the original.
Frequently asked questions
How do I compress an image to a specific KB size?
Open the tool at the top of this page, add your image, type the size you need (for example 100) and choose KB. Press Compress. Resizo tries a series of quality settings on your own device until it finds the highest one that still fits under your limit, then hands you the file.
Can I compress an image to exactly 100KB?
You can compress to just under 100KB, which is what upload forms actually check. Landing on exactly 100.0KB is not possible because image encoders only accept a quality setting, not a byte count. Resizo gets as close as it can from below, typically within one or two percent.
How do I reduce an image to 50KB for a passport application?
Add your photo, click the 50 KB chip and press Compress. Keep the output as JPG, because passport and visa portals rarely accept WebP. If the photo also has to be a set pixel size, crop it first with the passport photo resizer, then bring the result here. Caps differ by portal and are often smaller than people expect — our guide to passport photo file size limits by portal lists what each one allows, with a link to the authority it came from.
What is the difference between compressing and resizing an image?
Resizing changes the pixel dimensions, so a 4000×3000 photo becomes 1200×900. Compressing keeps the dimensions and throws away detail the eye is unlikely to miss. Compression is reversible in the sense that you can re-encode, but the discarded detail never comes back. Both make files smaller.
How do I compress multiple images to the same size?
Drop up to 50 images in at once. Every image is searched separately against the same target, because a screenshot and a portrait need very different quality settings to land on the same number of bytes. When they are done, download them together as a ZIP.
Does compressing an image reduce its quality?
JPG, WebP and AVIF are lossy, so some detail is discarded, and how much depends on how aggressive your target is. Cutting a 3MB photo to 500KB is usually invisible on screen; cutting the same photo to 20KB is not. PNG discards nothing, but it can only reach a target by shrinking the picture.
What file formats can I download the compressed image in?
Five: JPG, WebP, AVIF, PNG and PDF. JPG is the safe default for upload forms. WebP and AVIF hit the same target at a higher quality. PNG stays lossless and keeps transparency, so it reaches a target by shrinking. PDF wraps each image as a one-page document.
How do I compress an image without uploading it to a server?
Use a tool that compresses in the browser, like this one. Resizo has no backend that receives images. The whole search runs in your tab using the canvas API, so the file never leaves your device. You can prove it by disconnecting from the internet after the page loads and compressing anyway.
What is binary-search compression?
It is a way of finding the best quality setting in about eight tries instead of a hundred. The tool encodes at the midpoint of a range, checks whether the result fits your target, then discards the half of the range that cannot contain the answer, and repeats until the range is tiny.
Ready to hit your target size?
Free, instant, 100% private. No upload to any server.
Compress an image →