Runs in your browser. Nothing is uploaded.

Compress an Image to an Exact File Size (20 KB, 50 KB, 100 KB)

Type the size limit your form asks for and the tool finds the best quality that fits under it. Add an exact width and height if the form needs one. Nothing is uploaded.

  • Free forever
  • No signup
  • No watermark
  • Batch + ZIP

Exact pixel size (optional)

Leave empty to let the tool choose the pixel size. Use the size your form asks for, because forms differ. The two buttons are only common examples.

Output format

WebP gives the smallest files for most photos.

80%

Optional. Never enlarges an image.

  • Private by designFiles never leave your device
  • Instant resultsNo upload or download wait
  • Batch readyMany files, one ZIP
  • iPhone friendlyHEIC photos supported
Target file size

Set the size, not the quality

Upload forms, exam portals and email systems often say "maximum 50 KB" or "under 100 KB". A normal compressor makes you guess a quality setting and try again until the file fits. Here you type the limit instead. The tool tries different quality levels on your picture and keeps the highest one that still comes out under your number. If lowering quality is not enough, it also reduces the pixel size until the file fits, and the result row shows the old and new pixel size next to the old and new file size.

If your form also asks for exact dimensions, such as 200 × 230 pixels, enter them in the Exact pixel size box. The picture is then cut or scaled to exactly that size, and only the quality is lowered to reach your file size. Everything runs inside your browser, so your photo and signature are not uploaded anywhere.

The target works with JPEG and WebP output, and this page starts on JPEG because it is the format most forms accept. PNG is lossless, so it has no quality setting that can be lowered to hit a size. If you drop in a PNG, choose JPEG as the output format. The tool counts 1 KB as 1,000 bytes when it aims for your limit, so a result under your limit is also under it if your form counts 1,024. The result row shows sizes in units of 1,024 bytes, so it can read about 2 percent lower than the number you typed.

How it works

How the tool reaches your size

A search for the best quality that fits, then fewer pixels only if needed.

For each picture the tool encodes it at several quality levels and compares the file size with your target, like a guessing game that homes in on the answer in a handful of steps. It keeps the highest quality that fits. When pixel size is free, it will not push the quality below a reasonable level to save pixels: it removes pixels first, because a smaller but clean picture usually looks better than a large, blocky one. When you fix the pixel size yourself, it cannot remove pixels, so it lowers the quality as far as it needs to.

If a file already fits, it is not made worse. The quality is capped just below the maximum, so a picture that is already smaller than your target comes out at or below the target without being bloated. If even the lowest quality cannot reach your number at the size you fixed, the row says "Could not reach" and shows the smallest file it could make.

Real numbers

What you get at 200, 100, 50 and 20 KB

Measured with this tool on two real photos.

We ran a 5472×3649 night photo of a house among trees (10.8 MB) through the tool as a JPEG with no exact size set, so the tool chose the pixel size. Besides file size and pixels we computed SSIM, a score of how similar the result is to the original, where 1.0 means identical. SSIM was measured on brightness at one common 1,200-pixel width, so a result that lost pixels is judged at the same size as the original. It is a rough guide: compare the rows with each other rather than treating any one value as pass or fail.

TargetFile sizePixelsSimilarity (SSIM)
200 KB197.8 KB2404×16030.977
100 KB96.1 KB1700×11340.961
50 KB49.6 KB1202×8020.939
20 KB19.6 KB657×4380.885

Detail matters. We also tried a 3331×3388 portrait-style photo with fine hair and knitted fabric, 5.6 MB. At 50 KB it came out at 49.2 KB, 856×870 pixels, SSIM 0.818, and at 20 KB it came out at 20.0 KB, 578×588 pixels, SSIM 0.773. Pictures full of fine texture lose more than smooth ones at the same size limit.

Test images: two photos from our own files, 29 November 2026. File sizes here are in kilobytes of 1,000 bytes, the unit the tool aims at, while the result row in the tool shows units of 1,024 bytes and so reads about 2 percent lower. Your results will differ with your picture. The figures are examples, not promises.

Forms

Photo and signature for online forms

Exact pixels and a file size limit together.

Many application forms want a photo of a certain pixel size and a file under a certain number of kilobytes. Enter both. We cropped the centre of a 4305×6458 photo to 200 × 230 pixels with Crop to fill. With a 50 KB target the result was 17.8 KB, already under the limit at near-maximum quality (SSIM 0.996 at 200 × 230). With a 10 KB target it came out at 10.0 KB with SSIM 0.992, so at small pixel sizes you can go far below the usual limits without much visible change.

Always use the numbers printed on your own form. Pixel sizes, file limits and accepted formats differ between forms, and some check the file extension and type as well. The two size buttons above are only examples, not rules for any particular exam or authority. For a signature, photograph it on white paper in good light, crop tightly around it first, and then set the size your form asks for.

Format

JPEG or WebP for a size limit?

About the same size and quality in our test.

On the night photo, a 50 KB target gave 49.6 KB as JPEG (1202×802 pixels, SSIM 0.939) and 49.2 KB as WebP (1244×830 pixels, SSIM 0.936). At 20 KB, JPEG gave 19.6 KB (657×438, 0.885) and WebP gave 19.6 KB (723×482, 0.892). They are close on this one picture, so we would not read that as a rule. The practical difference is acceptance: nearly every form takes JPG, while some older portals reject WebP. Pick JPEG unless you know WebP is allowed.

Limits

What a size limit costs you

So you know before you start.

A smaller file always means less information. A 20 KB picture is fine for a form thumbnail and poor for printing or a large screen. The tool is honest about this: it shrinks the pixel size when it must, and it can fall short of an unrealistic target instead of producing an unreadable picture. If your form allows a larger file, use the larger limit. Only JPEG and WebP outputs use the target, and very large pictures take a few seconds longer because the tool tries several sizes.

FAQ

Frequently asked questions

Short answers to the things people ask most.

How do I compress an image to 50 KB?

Add your picture, type 50 in the Target file size box (or tap the 50 KB button), keep JPEG as the output format and download the result. The tool finds the best quality that stays under 50 KB and reduces the pixel size only if it has to.

Will my picture get smaller in pixels?

It can. When you do not set an exact size, the tool reduces the pixel size if lowering quality alone cannot reach your limit. To keep the pixel size, enter an exact width and height, and the tool will only lower the quality.

Can I set a pixel size and a file size together?

Yes. Enter the width and height in the Exact pixel size box and the limit in Target file size. Crop to fill gives exactly the size by trimming the edges, Fit inside keeps the proportions and Stretch forces the size.

Why does the result come out smaller than my target?

The tool does not add quality beyond a near-maximum level, so a picture that fits easily stays well under the limit. A 17.8 KB result for a 50 KB target means the picture was already small at that pixel size.

What does "Could not reach" mean?

Even the lowest quality at the size you fixed was bigger than your target. Remove the exact size so the tool may reduce pixels, choose a smaller size, or raise the limit if the form allows it.

Does it work with PNG?

The size target works with JPEG and WebP output. PNG is lossless and cannot be lowered to a size, so choose JPEG as the output format and the tool will convert and fit the file.

Is 1 KB 1,000 or 1,024 bytes?

The tool aims at 1 KB = 1,000 bytes, so a file under your limit is also under it if your form counts 1,024 bytes per KB. The result row in the tool shows sizes in units of 1,024 bytes, so it can read about 2 percent lower than the number you typed.

Are my photos uploaded?

No. The compression runs in your browser, so your photo or signature never leaves your device.

Keep reading

Related tools and guides

Need a smaller file for a form?

Drop your picture into the tool at the top of this page, or open the full compressor on the home page.

Open the image compressor