Compress an Image to a Target Size

Choose a file size limit in KB and Pixellin finds the highest quality that fits under it. Useful whenever a form or website rejects images above a certain size.

  • On-device
  • No sign-up
  • Batch
  • Free, no watermark

Drop images on the plate

or paste with Ctrl/⌘ V

JPG, PNG, WebP, HEIC, AVIF, BMP, TIFF Up to 200 files · 50 MB each

Processed on this device

How it works

  1. 01Drop, choose or paste the images you need to fit under a limit.
  2. 02Pick a target size in KB and choose JPG or WebP output.
  3. 03Select Process and check the final size and dimensions reported.
  4. 04Download each file or select Download all for a ZIP.

Why use this tool

Hits your size limit

Pixellin searches for the best quality that lands under your target, so you don’t have to guess slider values.

Common photo formats in

JPG, PNG, WebP, HEIC, AVIF, BMP and TIFF are accepted. The output is JPG by default, or WebP.

Honest about trade-offs

If quality alone can’t reach the target, the image is scaled down step by step and the final dimensions are reported.

Supported formats

Use cases

Unusual upload limits

Some sites ask for something specific, like under 300 KB or 2 MB. Enter the exact number instead of guessing quality settings.

Website image budgets

Set a performance budget, for example 200 KB per image, and bring a whole set of banner photos under it in one batch.

iPhone photos for forms

Turn a HEIC photo from an iPhone into a JPG that fits under a form’s limit in one step, without a separate conversion.

Technical details

Target-size mode works differently from a quality slider. Pixellin encodes the image, checks the size, and searches for the highest quality that still lands under your target. That avoids both overshooting the limit and wasting quality by compressing more than necessary. PNG, HEIC and other inputs are converted along the way. Output is JPG by default, which nearly every upload form accepts, or WebP when the destination supports it.

Some targets are too small for the image’s pixel count. When even a low quality setting doesn’t fit, Pixellin reduces the dimensions step by step until it does, then reports the final size and dimensions so nothing happens silently. For the most common limits there are ready-made pages with the target preset, such as Compress to 50 KB. Use this page for any other number, small or large.

Your files stay with you

This tool runs entirely inside your browser using Web Workers and WebAssembly. Your images are never uploaded, never stored on a server and never used to train AI. Close the tab and they’re gone. Learn more

Frequently asked questions

How do I compress an image to a specific size in KB?

Add the image, enter or pick the target size in KB, and select Process. Pixellin tries quality levels until it finds the highest one under your limit, then shows the final size. Download the file and upload it where you need it.

Why did my image get smaller in pixels too?

Your target was too small for the image at its original dimensions, even at low quality. Rather than fail, Pixellin reduces the width and height step by step until the file fits, and it reports the new dimensions so you know what changed.

Should I choose JPG or WebP output?

Choose JPG when you’re uploading to a form, portal or older system, because it is accepted almost everywhere. Choose WebP for your own website or apps that support it. Both are searched for the highest quality under your target.

Will the result be exactly the target size?

It will be at or below the target, not padded to match it exactly. Because Pixellin looks for the highest quality that still fits, the result usually sits close to the limit, giving you as much quality as the limit permits.

How is this different from the regular compressor?

The regular compressor asks you for a quality value and accepts whatever size results. Here you set the size and Pixellin works out the quality, and if needed the dimensions, to reach it. Use this when a hard upload limit is what matters.

Related tools

You may also need

Related guides