Compress Image Online to Any Size in KB

Reduce photo size to any KB range, in your browser.

Exact dimensions (optional)

For example 3.5 cm x 4.5 cm for many passport-size photo fields. The image is stretched to fit exactly, so crop it to the right shape first.

Use this free tool to compress image files to the exact size an online form, website or email asks for. Choose a photo, type the maximum size in KB, add a minimum if your form has one, and press the button. The tool finds the highest quality that fits your range and shows a before and after preview. It runs completely in your browser, so your photo is never uploaded anywhere.

How to reduce image size in KB

  1. Tap Choose a photo or drag the file into the box. JPG, PNG, WebP, GIF and BMP are supported, up to 25 MB.
  2. Enter the maximum size in KB. If the form says "between 20 KB and 50 KB", enter 20 as the minimum and 50 as the maximum.
  3. Optional: open Exact dimensions and enter a width and height in pixels, centimetres or inches.
  4. Press Compress image, check the preview and press Download.

How this image compressor works

The photo is drawn onto an HTML canvas and saved again as a JPG (or WebP). JPG lets us choose a quality level from 0 to 100. Instead of guessing, the tool runs a binary search: it tries a middle quality, checks the file size, then moves up or down and repeats about eight times. This finds the best quality that stays under your limit in a fraction of a second. If even the lowest sensible quality is still too large, the tool reduces the pixel dimensions step by step until the file fits. If the result is smaller than your minimum, it raises the quality or the dimensions again.

Very large photos from modern phones, sometimes 8000 pixels wide, are first scaled down to 4000 pixels on the long side. This keeps the browser from running out of memory on budget Android phones and does not affect forms, which always need much smaller images.

Worked example

A phone photo is 3.4 MB and 4000 × 3000 pixels. A scholarship form wants a JPG between 20 KB and 50 KB. With 20 and 50 entered, the tool first tries quality 95, which gives about 1.9 MB, far too big. The quality search alone cannot reach 50 KB at full size, so the dimensions shrink gradually. The final file is about 48 KB at roughly 1000 × 750 pixels, which is still sharp on any screen and comfortably inside the range.

Photo size reducer tips

  • Crop first. Removing empty background lets every kilobyte go to the face or document.
  • Use the original file. Compressing a file that was already compressed several times adds blockiness.
  • PNG becomes JPG. PNG cannot be squeezed to a target size, so the output is JPG with transparent areas filled in white.
  • WebP is smaller for the same quality, but many government portals accept only JPG. Choose JPG for forms.

Common uses

People use this page to shrink photos for job and exam applications, scholarship and passport portals, college admission forms, email attachments with size limits and product photos for online shops. For the most common limits there are ready-made pages: signatures at 20KB, passport photos at 50KB, documents at 100KB and marksheets at 200KB. If your form also gives dimensions, resize the image first.

Last updated:

Compress Image FAQ

How do I compress an image to a specific size?

Choose your photo, type the maximum size in KB (and the minimum if your form has one), then press Compress. The tool searches for the best quality that fits the range.

Can I compress image files without losing quality?

Every lossy compression removes some detail. The tool keeps the highest quality that still fits your size limit, so the loss is as small as possible.

Why is my PNG converted to JPG?

PNG is a lossless format and cannot be squeezed to a target size by quality. JPG and WebP can, so the tool converts and fills transparent areas with white.

Is there a file size limit?

Files up to 25 MB are accepted. Very large photos are first scaled down to 4000 pixels on the long side so the browser does not run out of memory.

Are my photos uploaded anywhere?

No. Compression happens inside your browser with the Canvas API. The photo never leaves your phone or computer.

What if the result is smaller than the minimum size?

The tool raises the quality or the dimensions until the file is above the minimum. If the original image is tiny, it may not be possible to reach a large minimum.