Compress Image to 50 KB
Passport-style photos for exam, job and government portals are commonly capped at 50 KB. The target is already set: drop your photo and download a version that fits.
Click to choose images, drag and drop them here, or paste with Ctrl+V
JPG, PNG, WebP. Select more than one to compress in bulk. Stays on your device, nothing is uploaded.
Your compressed image will appear here once generated.
For JPEG/WebP, it binary-searches quality at your image's original size. If "Allow resizing" is off and quality alone can't hit the target, you'll get the smallest size possible without changing dimensions. PNG is lossless, so hitting a small target needs resizing turned on. JPEG or WebP will get you much closer to a small target at full size.
What fits in 50 KB
50 KB is the most common limit for a passport-style photo on online application forms. At this size a portrait of about 400 to 600 pixels on the long side still looks sharp, which is larger than most forms actually display it.
The tool keeps your original width and height when it can. A 12-megapixel phone photo cannot reach 50 KB at full resolution, so with Allow resizing on it steps the dimensions down just far enough to fit, then picks the highest JPEG quality under the limit. You get the largest, cleanest image the budget allows instead of a guess.
Two things help more than any setting: crop to head and shoulders before compressing, and use a plain, evenly lit background. Flat backgrounds cost very few bytes, leaving more of the 50 KB for the face. Always check the form's own notice for its exact limits, since some ask for a minimum size as well as a maximum.
How it works
The quality search for JPEG and WebP runs eight rounds of binary search over the encoder's quality parameter: encode at 0.5, compare the byte count against your target, then halve the interval up or down and encode again. Eight rounds pin the quality value down to within about 0.4% of its full range, which is why results usually land just under your target rather than far below it. With resizing enabled, that same search repeats at progressively smaller dimensions, shrinking 15% per step, until it finds a scale where quality alone can close the remaining gap.
PNG needs a completely different lever, because the browser's canvas encoder only
writes full truecolor files and has no quality knob at all. So this page ships its own
indexed-color PNG encoder: a median-cut quantizer builds a palette of 128 down to 8
representative colors, Floyd-Steinberg dithering diffuses the rounding error so
gradients don't turn into visible bands, and the palette indices are compressed with
the browser's native CompressionStream and written byte by byte into a
valid color-type-3 PNG, one byte per pixel instead of three or four. That's the same
technique pngquant and TinyPNG use, and on screenshots and flat graphics it routinely
cuts 60-80% without resizing. It requires a fully opaque image, since indexed PNG can't
store per-pixel transparency.
A practical shortcut before you reach for resizing: at equal visual quality, WebP files come out roughly a quarter to a third smaller than JPEG, so an image JPEG can't squeeze under your target at full resolution often fits once you switch the output format to WebP.
All of this runs against an in-memory canvas in this tab. You can verify it: open DevTools, switch to the Network tab, and compress something. No request ever carries your image, in either direction, and the tool keeps working with Wi-Fi switched off.
Common questions
Why can't it always hit my exact target size?
For JPEG and WebP the tool binary-searches the quality setting at your image's original dimensions. If even the lowest quality is still bigger than your target, you get the smallest file possible without changing the width and height. Turn on "Allow resizing" to let it shrink dimensions too, which reaches much smaller targets.
Which image formats are supported?
You can drop in JPG, PNG, or WebP files and export as JPEG, WebP, or PNG. JPEG and WebP give the best size control because their quality setting is adjustable. PNG is lossless, so its size varies and small targets usually need resizing turned on.
Is my image uploaded anywhere?
No. Compression happens entirely in your browser using the canvas API, so your images never leave your device. That also means there's no server-side file size cap or upload queue.
Can I compress several images at once?
Yes. Select or drag in multiple files, set one target size, and hit "Compress all". You can download the results one by one or grab everything as a single .zip.
From the blog: How to Compress Images Without Losing Quality