← Untitled

Compress an Image to an Exact KB Size: A Faster, Private Alternative

Reviewed by the FreeOnline.fyi team · Updated 2026-09-10

If you have ever applied for a UK visa, submitted a job application through an A

If you have ever applied for a UK visa, submitted a job application through an ATS portal, or listed a product on eBay, you have probably hit a wall: "Maximum file size: 240 KB" or "Image must be between 20 KB and 50 KB." These limits exist because servers are sized for thousands of small uploads, not because anyone enjoys blocking you.

The annoying part is that most image compressors expose a quality slider rather than a size target. You move the slider to 70%, download, check the file size, realise it is still 380 KB, slide back to 55%, download again, and so on. For a single image this is mildly irritating; for a batch of twenty product photos, it is a half-hour of guesswork.

When we built the [image compressor to an exact KB target](https://freeonline.fy

When we built the image compressor to an exact KB target, we flipped the controls. You type the number you need — say, 240 — and the tool re-encodes your image, measures the result, then adjusts the quality automatically until the file lands within a few KB of that target. You can stay on the keyboard and watch the "compressed" readout converge, rather than playing slider ping-pong across a dozen downloads.

Everything happens inside your browser using the standard Canvas API documented on MDN, which means the original photo never leaves your laptop. For passport photos, headshots, and ID documents that feels like a meaningful upgrade over uploading them to a third-party server, and it is the reason we made the tool single-file and offline-capable by design.

Most people end up choosing between four options, and the right pick depends on

Most people end up choosing between four options, and the right pick depends on what you are actually trying to do. Desktop apps like ImageOptim or RIOT give you fine control but expect you to install software and still fiddle with quality rather than a target. Cloud services like TinyPNG or compressor.io are quick but upload your file to a remote server, which is awkward for personal documents. CLI tools like cwebp or ImageMagick are unbeatable for automation but impractical for a one-off upload form.

A browser-based target-size compressor sits in the gap between cloud convenience and desktop control: it is as fast as a hosted tool, as private as a local app, and it solves the exact problem most forms create — a hard KB ceiling. If you need to hit a specific number rather than chase the lowest quality you can tolerate, it is usually the shortest path. For background on why WebP in particular often beats JPG at the same visual quality for the same KB budget, the Google WebP documentation is a solid reference.

Open the tool and drag your photo into the drop-zone on the left, or click to br

Open the tool and drag your photo into the drop-zone on the left, or click to browse. JPG, PNG and WebP up to 20 MB are accepted. Type your target size in KB into the main field — for example, 240 for many job portals, 100 for tight passport-style requirements, or whatever number the form quotes you verbatim.

If the form also specifies dimensions, fill in the optional "max width" field to cap the longer side. This stops the encoder from wasting bytes on extra resolution that the upload would downscale or crop away anyway. The format selector defaults to "auto" which usually picks the smallest viable format, but you can force JPG or WebP if the upload is strict. Click download when the preview matches what you want — for any image under 5 MB, the first result is produced in under two seconds on a mid-range phone, with no signup and no watermark.

The tool cannot beat the laws of information theory.

The tool cannot beat the laws of information theory. If you ask it to squeeze a 5 MB landscape photo into 20 KB, you will get a file that meets the size target but shows obvious compression artefacts, especially in smooth gradients and skin tones. For very small targets, reduce the dimensions first — a 400-pixel-wide photo at 80% quality will almost always look better than a 4000-pixel-wide photo at 15%, and that combination is worth trying before you assume the tool has failed.

PNG is treated as lossless by default, which means a 2 MB PNG of a screenshot cannot usually be shrunk to 50 KB without falling back to a lossy re-encode. The tool handles this automatically, but if you specifically need a PNG output, expect the size to be approximate rather than precise. As always, verify the result before submitting it to anything official — a 2 KB overshoot can mean a rejected application, and we would rather you double-check than take our word for it.

The KB-target compressor is one of those small utilities you only need a few tim

The KB-target compressor is one of those small utilities you only need a few times a year, but when you need it, you really need it. It pairs well with the rest of our FreeOnline.fyi free online tools, which cover other one-off browser tasks like password generation and unit conversion, all without accounts or uploads. Bookmarks are usually faster than remembering yet another SaaS dashboard.

References