When a form says "maximum 100 KB"
Upload forms on government portals, exam registration systems, visa applications and job sites routinely cap images at 20 KB to 200 KB. Those limits were often set a decade or more ago and never revisited. A photo from a current phone is 3 to 8 MB — up to four hundred times too large — and the form usually rejects it with nothing more helpful than "file too large".
This tool starts from the limit instead of from a vague quality slider. You give it a number in kilobytes and it searches for the highest image quality that still fits underneath, so you get the best-looking image that the form will actually accept.
How the search works
JPEG and WebP have a quality setting from 1 to 100, but the relationship between that number and the resulting file size is not predictable — it depends entirely on the content of the image. A flat graphic compresses far smaller than a detailed photograph at the identical setting, so there is no formula that maps a target size to a quality value.
So the tool searches instead. It encodes the image, measures the real byte count, and narrows the range — higher if there is room to spare, lower if it overshot. About eight rounds of halving the interval is enough to land close to the ceiling without going over. If even the lowest quality is still too large, it reduces the dimensions and starts again, because past a certain point there is simply no way to describe that many pixels in that few bytes.
Dimensions matter as much as quality
Many forms specify both a file size and pixel dimensions — a photograph at 200 × 230 and a signature at 140 × 60 are common combinations. Turn onLimit the dimensions too and set the maximum width or height; the image is scaled to fit inside that box, keeping its proportions, before compression runs.
This also helps enormously with tight targets. Squeezing a 4000-pixel-wide photo into 20 KB at full resolution produces a blurry mess, because there are nowhere near enough bytes to go around. Scaling it to 600 pixels wide first and then compressing looks dramatically better at exactly the same file size.
A note on PNG
PNG is lossless: it must reproduce every pixel exactly, so it has no quality dial to turn. The only way to shrink a PNG is to reduce its dimensions, which is what happens when you select it here. If your image is a photograph and you do not need transparency, switching to JPEG will shrink it far more while looking essentially identical.
Rotation and privacy
Phone cameras frequently store an image the "wrong" way up and attach an EXIF orientation flag telling viewers how to rotate it. Tools that ignore that flag output sideways photos. This one reads and applies the orientation, so what you download matches what you saw.
Nothing is uploaded. Compression runs in your browser using the standard canvas API — no encoder to download and no waiting, so results are usually instant. That privacy matters here more than for most tools, because these forms typically involve passport photographs, signatures and identity documents.