Skip to site navigation
Image

Image tools

An image compressor you give a target size in kilobytes, not a quality percentage. The browser does the work and the file never leaves your device.

What for
All 6
Which one

Choosing a target size, and when to run a batch

Every page below opens on one target size. That split is deliberate, because the number is the whole reason you came and a page already set to it saves you a step. All six take a folder's worth of files at once, and two of them are written around that case.

  • Compress image to 20KB

    The tightest target here, and the one exam portals and government forms tend to ask for. A detailed photograph loses visible detail getting down there, and the tool reports the size it actually reached.

  • Image compressor to 20KB

    The same 20KB ceiling, built for the case where you have thirty files and every one of them has to clear it. Three run at a time and everything comes back as a single zip.

  • Compress image to 50KB

    Enough room that a headshot or a document scan usually survives with quality left over. This is the common ceiling on form and ID uploads.

  • Image compressor to 50KB

    The 50KB target written for a folder rather than a file. Results are written back into their original slots, so the output order matches the order you dropped the files in.

  • Compress image to 100KB

    Most photographs reach 100KB on quality alone, with the resolution ladder never touched. Screenshots are the exception, and they belong in PNG anyway.

  • Compress image to 200KB

    The most forgiving target on the site. A file that already sits under 200KB is handed straight back, byte for byte, with no re-encoding at all.

Mechanism

How the image compressor finds a size

You give it a number of kilobytes and it goes looking for the JPEG quality that fits. The search runs between 0.05 and 0.95 quality, keeping the last encoding that still lands under the target. It has a budget of eight encodes per resolution step. The first two probe the top and the bottom of the range, which leaves six bisections, and six bisections narrow a 0.9 wide range down to about plus or minus 0.014.

When even the lowest quality overshoots, there is nothing left to take out of the quality setting and the resolution has to move. The tool steps down a fixed ladder, 1, 0.8, 0.65, 0.5, 0.4, 0.3, 0.22 and 0.15 of the original, searching quality again at every rung and stopping at the first one that fits. That is why a 20KB target on a phone photograph often comes back smaller in pixels while a 200KB target on the same file does not.

An image that already sits under the target is handed back byte for byte with no re-encoding at all. That path is the only genuinely lossless one here, and it exists because re-encoding an already small JPEG costs quality and saves nothing worth having.

All of it runs inside a pool of Web Workers, at most three at once and fewer on a machine reporting fewer cores, so the tab stays usable while a folder of photographs goes through. Speed depends on your own machine rather than on how busy somebody's server is.

Batches

What a batch does with order and names

Files enter a queue that runs three at a time, so one large photograph does not hold up the small ones behind it. Each result is written back into its original slot, which means the output order always matches the input order no matter which file finished first. A file that fails leaves the rest of the batch running and can be retried on its own.

When the queue drains, everything packs into one zip, stored rather than deflated, since JPEGs are already compressed and deflating them again would only burn time. Duplicate filenames are renumbered inside the zip so nothing is quietly overwritten, which does mean the names coming out may not be the names that went in.

Limits

What compression here cannot do

  • The output is JPEG. Screenshots and line art belong in PNG, which this tool does not write, and a screenshot pushed through a JPEG encoder picks up a halo around every letter.
  • Metadata does not survive. Re-encoding through a canvas produces a fresh image with nothing attached, so the camera model and the GPS coordinates are gone, and so is the orientation tag. Some people want that and some people do not.
  • Transparency does not survive either, because JPEG has no channel to store it in. A PNG with an alpha channel comes back flattened.
  • A target small enough to fight the image cannot stay lossless. Quality drops, resolution may drop with it, and the result panel reports the size actually reached rather than pretending the target was met.
  • Every file in a batch shares one target. Files that need a different ceiling have to go through as a second batch.
  • Batch size is bounded by your device's memory, because each image is decoded to a full bitmap before it is re-encoded.
  • Forms often demand exact pixel dimensions on top of a maximum file size, and none of these pages enforce that. Read the instructions on the form before you upload.