← Untitled

Compressing Images to an Exact KB Target: Who Actually Needs It

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

Every so often, an upload form refuses to accept your file.

Every so often, an upload form refuses to accept your file. Not because the image is wrong — it looks fine — but because it weighs in at 247 KB and the portal insists on 200 KB max. We've all been there. Most generic image compressors give you a quality slider and call it a day, which is useless when you need to hit a specific number rather than an arbitrary "high" or "medium." That's why we built the Image Compressor to Target Size KB at FreeOnline.fyi: you type in a target size, drop in your image, and get back a file that lands as close to that number as the codec allows.

The "exact KB" requirement shows up more often than people expect. It rarely appears in casual social media uploads — those platforms happily accept megabytes. The pressure comes from structured forms: job portals, government ID verifications, marketplace listings and university applications, where every field has a numeric cap enforced by a server-side validator. Most of these systems will simply reject your submission if you overshoot by even a few kilobytes, which is why a "close enough" slider-based compressor isn't much help.

The use case is narrow but persistent, and it cuts across surprisingly different

The use case is narrow but persistent, and it cuts across surprisingly different audiences. Job seekers hit it when an applicant tracking system caps a CV headshot at, say, 100 KB. eBay and Etsy sellers run into it when a marketplace rejects a product photo over 500 KB or 1 MB. Visa applicants and passport renewers encounter it on gov.uk passport photo uploads, which carry strict size and dimension rules for the digital file. University application portals, online exam proctoring systems and some healthcare intake forms impose similar limits. The common thread is that nobody in these workflows accepts "good enough" — they want a file that fits the box exactly.

What makes these constraints frustrating is that they don't line up with what image-editing apps give you out of the box. Photoshop's "Save for Web" is the closest mainstream equivalent, but it's overkill for a one-off task and badly priced for anyone who isn't a designer. Free desktop tools typically expose a quality slider with no size readout, so you're left guessing whether 75% quality will land you at 180 KB or 320 KB, exporting repeatedly until you happen to land in range.

We flipped the usual compression flow to solve this.

We flipped the usual compression flow to solve this. Instead of "pick a quality, see what size you get," you specify the size first and the tool works backward. Internally, it performs a binary-search-style quality scan: re-encodes the image at a few quality levels, measures the resulting bytes, and narrows in on the quality value that lands nearest your target. You can also cap the width in pixels, which is often the single most effective lever. A 4000-pixel-wide JPEG will never comfortably fit in 100 KB no matter how low you push the quality, but resizing to 1200 pixels changes the math entirely. The advanced "min quality" slider prevents the algorithm from going so low that the image becomes visibly blocky; we default it to 30% as a sensible floor. Output format is configurable too — switching a heavy PNG screenshot to JPG or WebP often halves the size for free, and you can let the tool pick the most efficient format automatically.

A concrete example from our testing: a 3.2 MB smartphone photo (4032×3024 JPEG at default quality) needed to fit a 200 KB job-portal cap. We set the target to 200 KB, capped width at 1200 px, and left everything else on defaults. The compressor returned a 198.4 KB JPEG at width 1200, quality 62 — a clean result suitable for a profile photo, with no obvious artefacts at normal viewing sizes.

Drop the target to 100 KB and the same workflow produces a 98.7 KB file at quali

Drop the target to 100 KB and the same workflow produces a 98.7 KB file at quality 41, where you'd start to see mild artefacts on a desktop monitor but which still reads perfectly well on a phone screen or in a thumbnail. The point isn't that 41% quality is universally fine — it isn't, and we'd never recommend it for print — but that you control the trade-off explicitly instead of guessing. For background on why WebP often beats JPEG for target-size work, the MDN guide to image file types is a solid reference, though for everyday passport, CV and marketplace use cases, sticking with JPEG keeps things compatible with every portal you'll meet.

A few honest limitations worth flagging. PNG files with lots of unique colours compress very inefficiently; if you ask for 50 KB from a 5 MB PNG screenshot, the algorithm will likely return a larger file than you hoped, or warn that the target is unreachable within quality bounds. Switching the output format dropdown to JPG or WebP usually fixes this. Very small targets (under 20 KB) from a large detailed source are similarly constrained — there's a floor below which no encoder can compress a photo regardless of quality, and resizing the dimensions is the only real lever left.

The tool runs entirely in your browser using the browser's built-in encoder, so

The tool runs entirely in your browser using the browser's built-in encoder, so there's no upload step at any stage. That has clear privacy upside: your passport photo, ID scan or confidential product mockup never leaves your laptop, which matters more for some files than others. The trade-off is that very large source files (we cap uploads at 20 MB) may take a few seconds longer on older phones, and the final byte count depends on how good your browser's encoder is — Chrome and Firefox produce clean results in our experience, while some older mobile browsers are noticeably less efficient.

If you regularly find yourself fighting upload forms, this is one of those utilities worth bookmarking alongside the rest of our free online tools. It does one thing, it does it predictably, and it gets out of your way. As always, we recommend opening the downloaded file in your file manager and confirming the size matches the on-screen readout before submitting — small differences between kilobytes and kibibytes occasionally trip people up, and verifying important numbers is just good practice, especially for time-sensitive applications.

References