Compress an image to a target size
Drop a PNG, JPG, WebP, or AVIF and set the limit, and the width and height too if the form gives them. It finds the highest quality that fits. Your browser does the work, so the picture stays on your device.
How to use it#
- Drop a picture into the box above, or click to choose one.
- Type the size limit in KB or MB, or pick a common one: 10, 20, 50, 100, 200, or 500 KB.
- If the form also sets the dimensions, such as 200 × 230 pixels, type the width and height. Leave both empty to keep the picture its own size.
- Choose JPG or WebP, and whether the picture may be made smaller if quality alone is not enough.
- Check the preview, then press Download.
Quality first, pixels second#
Most size limits come from upload forms, such as the one for a passport photo or a job application. Many of those forms also check the dimensions, so a smaller picture that meets the size limit can still be rejected. That is why this lowers the quality first and keeps every pixel for as long as it can.
It searches for the highest quality that still fits, encoding the picture a handful of times to measure the real size at each step, since a file size cannot be worked out in advance. Only when the quality would have to drop below 40 per cent does it make the picture smaller instead, because below that JPEG blocking is plain to see, and a slightly smaller picture at decent quality looks better at the same file size. It then spends whatever room is left on quality again.
If the form wants the picture at its own size, untick shrink the picture. The dimensions then stay exactly as they are, and quality goes as low as it has to. If even that is not enough, the page tells you how close it got.
When the form sets the pixel size too#
Exam and job application forms often ask for both: a photo of 200 by 230 pixels under 20 KB, say, or a signature of 140 by 60 pixels under 10 KB. Type the width and height into the exact size boxes and the file comes out at exactly that many pixels, with the byte limit then met by quality alone. Shrink the picture switches off, because the size is already settled.
A photo is rarely the same shape as the box the form wants. A phone photo is 4 by 3, and 200 by 230 is taller than it is wide. Stretching it would squash the face, and adding white bars would give the form a border it did not ask for, so the picture is cropped from the centre to fill the shape and then scaled. The result panel says which edges were trimmed. If the centre is not where your face or signature sits, crop it yourself first with the crop tool, which can also cut to a passport photo size, and bring the crop back here.
A size in centimetres, such as a 3.5 by 4.5 cm photo under 50 KB, is a printed size, and the pixel count depends on the resolution it is printed at. At 300 DPI, 3.5 by 4.5 cm is 413 by 531 pixels. When the form gives only centimetres, it is the shape that counts, so type 413 and 531, or crop to a 35 by 45 mm passport size first, then set the byte limit as usual.
JPG or WebP#
JPG is the safe choice for anything going into a form, because every upload page accepts it. It has no transparency, so any see-through part of a PNG is filled with white.
WebP gets noticeably smaller files at the same quality, often a quarter or a third smaller, and keeps transparency. Use it when you know the place it is going accepts WebP, such as your own website.
When the file is already small enough#
A file that is already under the limit, and already in the format you chose, is handed back byte for byte. Re-encoding it would only lose quality for no gain in size. A PNG under the limit is still converted when you choose JPG, since the format is part of what you asked for.
Frequently asked questions#
Is a kilobyte 1000 or 1024 bytes?
#
Here it is 1000, so 100 KB means 100,000 bytes. Some forms count a kilobyte as 1024 bytes and allow slightly more, so a file under the limit here passes either way. Your computer may show a different number for the same file. Windows counts in 1024s, so a file of 100,000 bytes appears there as about 98 KB, while a Mac counts in 1000s and shows 100 KB.
Is this the same as resizing an image to 50 KB?
#
Yes. Forms often say resize when they mean the file size in KB, and that is what this does: set 50 KB, or whatever the form asks for, and it keeps the pixel size wherever quality alone can get there. To change the width and height without a byte limit, use the image resizer.
Will it change the dimensions of my image?
#
Only when lowering the quality to 40 per cent is not enough, and only while shrink the picture is ticked. The result panel shows the dimensions and says whether they changed. Untick the box and the dimensions are kept whatever it costs in quality. Type a width and height into the exact size boxes and the file comes out at that size instead.
Can it get a photo under 20 KB?
#
Yes, and under 10 KB as well. Limits of 10 to 20 KB are common for the photo and signature on exam and government application forms. Quality alone rarely gets a phone photo that small, so with shrink the picture ticked it also makes the picture smaller, and the result panel shows the dimensions it ended at. If the form asks for particular dimensions, such as 200 × 230 pixels, type them into the exact size boxes, so every byte goes on the size the form wants.
What if the form also gives a size in pixels?
#
Type the width and height into the exact size boxes. The file then comes out at exactly that many pixels, and the byte limit is met by lowering quality alone. If your picture is a different shape, it is cropped from the centre to fill the size rather than stretched or given white bars, and the result panel says which edges were trimmed. To choose the framing yourself, cut it with the crop tool first.
Can it make a signature 140 × 60 pixels and under 10 KB?
#
Yes. Photograph or scan the signature on white paper, type 140 and 60 into the exact size boxes, and set 10 KB. A signature is mostly white, so it fits easily at a good quality. A photo of a signature is usually much taller than 140 by 60, so the top and bottom are trimmed from the centre. If that cuts into the signature, crop close around it first with the crop tool and the trim has nothing left to take.
Can I compress a PNG to 100 KB and keep it a PNG?
#
Not here. A PNG is lossless, so it has no quality setting to lower, and the big savings come only from fewer pixels or fewer colours. This saves a PNG as JPG or WebP, which is how a screenshot or a photo saved as PNG gets under a limit without shrinking. Choose WebP to keep a transparent background. To keep the PNG format, the image compressor cuts a PNG down to 256 colours or fewer, and shows the size that came out.
Does it work on a phone?
#
Yes. The page runs in the browser on your phone, so a photo can go straight from the camera roll to the form. An iPhone saves photos as HEIC, which most browsers cannot read, but choosing one from the photo library usually hands the page a JPEG copy. If a HEIC file is refused, turn it into a JPG with the HEIC to JPG converter first.
Why is the file a little under the target rather than exactly on it?
#
Because the search looks for the highest quality that fits, and every step of it is a full encode. It stops after a few steps, once the next one would change the quality by a point or two, so the result usually lands a few per cent under the target rather than on it. The difference is not something you would see in the picture.
Why does it take a few seconds on a large photo?
#
Every step of the search is a full encode of the picture, and a 12 megapixel photo can take a dozen of them. They run in the background, so the page stays usable, and the time it took appears in the figures beside the result.
Is my picture uploaded?
#
No. It is decoded and re-encoded by your own browser in this tab. The pictures people shrink for forms are often ID photos and document scans, and none of them leaves your device.