Skip to site navigation
Image

Compress image to 50KB

Pick the size, and the quality is worked out for you. The file comes out at 50KB or under.

Sample
Loading a sample to compress…
1Images
No file handy?
No images added yet.
2Target

Mechanism

How this works

Most compressors give you a quality slider and let you guess your way toward a byte count. This one takes the byte count as the input. It encodes at quality 0.95 first, since plenty of images already fit and need nothing else, then bisects the range down toward 0.05, remembering the last encoding that stayed under 51,200 bytes rather than returning wherever the search converged. The budget is eight encodes at each resolution step. Two of those probe the top and bottom of the range, so six bisections remain, which lands the quality within about 0.014 of the best value that still fits.

Limits

What it cannot do

  • The output is JPEG, so transparency is lost. A PNG with a transparent background comes out with that background filled.
  • An image already under 50KB is returned byte for byte with no re-encoding. That is the only genuinely lossless path here, and every other path costs you something.
Questions

Questions people actually ask

Why ask for a size instead of giving me a quality slider?
Because the limit you are working against is a size. Forms and portals reject anything over a fixed number of kilobytes, and a quality slider makes you guess repeatedly until you land under it. Handing the tool the number does the guessing for you.
What if my image cannot reach 50KB?
Large photographs sometimes cannot hit the target on quality alone. When that happens the tool reduces resolution in steps and searches quality again at each step. If it still cannot get there, it reports the size it actually achieved rather than handing you a file that will be rejected.
Does it re-encode a file that is already small enough?
No. If your file is already at or under 50KB it is returned untouched, byte for byte. Re-encoding it would throw away quality to achieve nothing.
Are my photos uploaded anywhere?
No. Compression runs in your browser on a canvas inside a Web Worker. The file never crosses the network, which is also why the tool keeps working if you drop your connection after the page has loaded.