Documents & Photos

Photo KB Optimizer

Compress any image to a target file size in KB without changing its dimensions.

A general image compressor gives you a smaller file. A government form needs a specific one — under 50 KB, or between 10 and 20 KB, with no room for approximation. This tool targets an exact size band and tells you what it achieved.

Nothing is uploaded. Your image is read by your own browser and processed on a canvas element on your device. It never reaches a server, ours or anyone else's, and closing the tab discards it entirely.

Enter your details

Drop an image here, or choose a file

JPG, PNG or WebP · up to 20 MB

Your image is processed entirely inside this browser tab. It is never uploaded, stored or seen by anyone.

Result

Fill in the fields above and your result will appear here.

What the Photo KB Optimizer does

The difference between "compress this image" and "make this image 48 KB" matters. Generic compressors apply a fixed quality setting and you discover the result afterwards. Portals reject anything over the limit, so the useful behaviour is to search for the quality that lands just underneath it.

Because file size depends on image content as well as quality — a detailed photograph compresses differently from a plain document scan — the only reliable way to hit a target is to encode repeatedly and measure. That is what happens here, on your device.

How to use this tool

  1. Drop the image onto the upload area, or click to choose a file.
  2. Pick a preset if one matches your form, or set the dimensions and KB limits manually.
  3. Set the maximum size to the limit the form states, and the minimum if it specifies one.
  4. Leave the fit option ticked to preserve proportions.
  5. Process the image, check the reported size against the requirement, then download.

How the target size is reached

The image is redrawn at the target pixel dimensions, then encoded as JPEG repeatedly at different quality levels. A binary search narrows the quality range: if the file is under the limit → try higher quality if the file is over the limit → try lower quality After eight iterations the search converges on the highest quality whose output still fits. If the lowest quality is still too large, the canvas is scaled down in steps and the search repeats.

Worked example

Example: a 2.8 MB scan for a 20 KB limit

Original2,480 × 3,508 px, 2.8 MB
Target413 × 531 px, under 20 KB
Quality foundabout 58%
Final sizearound 19 KB

A reduction of more than 99% while staying inside the pixel dimensions the portal requires. Some softness is visible at this quality — that is the cost of a 20 KB ceiling.

What your result means

A result just under the limit is the correct outcome. Files far below the limit have thrown away detail unnecessarily.

A low quality percentage — under about 55% — means the KB limit is tight for those dimensions. Reducing the pixel size slightly often produces a better-looking result at the same file size.

If the tool reports it cannot reach the target, the dimensions are too large for that limit. Reduce the pixel size or ask whether the form accepts a larger file.

Important considerations

  • JPEG compression is lossy and cannot be undone. Always keep the original file.
  • Photographs compress far better than screenshots or text scans, which have sharp edges that JPEG handles poorly. For a document scan, reducing dimensions helps more than reducing quality.
  • Some portals specify a minimum as well as a maximum size. A file that is too small can be rejected just as a file that is too large can.
  • Repeatedly compressing an already-compressed image degrades it further. Start from the original each time.
  • If a portal rejects a file that meets the stated size, check the format — some accept only JPEG, others only PNG.
  • Preset values are provided for convenience and change between notification cycles. Confirm against the current instructions.

Limitations of this tool

  • Output is JPEG only. Forms requiring PNG, or transparency, are not supported.
  • It cannot make a low-resolution image sharper — reducing file size never adds detail back.
  • Extremely small targets at large dimensions may be unreachable, and the tool will say so rather than producing an oversized file.

Frequently asked questions

How do I reduce an image to 20 KB?

Set the maximum to 20 KB and process. The tool searches for the JPEG quality that produces the largest file under that size, typically landing at 18–19 KB.

Will compressing to 20 KB ruin the image?

At small pixel dimensions, usually not noticeably. At larger dimensions, a 20 KB limit forces heavy compression and softness becomes visible. Reducing the pixel size is often the better trade.

Is my image sent anywhere?

No. All processing happens in your browser using the canvas element. The file never leaves your device.

Why is my file still too large?

The pixel dimensions may be too big for the KB limit. Reduce the width and height, and the same file size will accommodate the smaller image comfortably.

Last reviewed: · Category: Documents & Photos

Preset dimensions and file-size limits are commonly required values provided for convenience. Specifications are set by each notification or portal and change between cycles. Confirm the required pixel size, file size, format and background against the current official instructions before uploading. Read the full disclaimer.