Compress an image to an exact size in KB
Choose a photo, set the size you need, and download a version that is just under it. It runs in your browser, so the file stays on your device.
Quick answer: choose your image, enter the KB limit from your form (for example 50), press compress, then download the result. If a very small limit forces the tool to shrink the pixel dimensions, the result panel shows the new size.
- Add images
- Choose settings
- Download
Compare
Slide to compare the compressed image (left) with the original (right).
Session history (0)
Results from this visit only. They are kept in memory, not saved, and disappear when you close the tab.
How the compressor works
A JPEG or WebP file can be made smaller in two ways: store the picture at a lower quality, or store fewer pixels. The tool tries both in a fixed order so you keep as much detail as possible.
- It first looks for the highest quality setting that keeps the file under your target at the original pixel size. It does this by trying quality levels and narrowing in on the largest one that fits.
- If even a fairly low quality is still too large, it shrinks the pixel dimensions in steps (for example to 90%, 80% and so on) and repeats the search, stopping at the first size that fits with acceptable quality.
- If nothing fits, it tells you so and shows the smallest result it could make, rather than silently handing you a broken file.
Because the width and height are scaled together, the shape of your picture never changes. The result panel shows the final size, dimensions and quality so you can judge the trade-off before you download.
Common size limits and what fits
Estimates assume moderate JPEG quality of about 1.2 bits per pixel. Real files vary with how detailed the picture is.
| Target | Roughly fits | Best for |
|---|---|---|
| 20 KB | 370 x 370 px square | A small portrait or signature image. A full-size phone photo cannot fit at 20 KB without being shrunk a lot. |
| 50 KB | 584 x 584 px square | A passport-style portrait, a cropped ID photo, or a single scanned line or stamp. |
| 100 KB | 826 x 826 px square | A decent-quality portrait, a clear single-page document scan, or a web banner. |
| 200 KB | 1,168 x 1,168 px square | A good-quality portrait, a certificate or ID scan, or a social-media-sized picture. |
| 500 KB | 1,848 x 1,848 px square | Everyday photos, document scans in colour, and images for email or web pages. |
JPG, WebP or PNG?
| Format | Good for | Watch out for |
|---|---|---|
| JPG | Photos and scans; accepted almost everywhere, including most upload forms. | Sharp text and thin lines can soften at small sizes. No transparency. |
| WebP | Photos for websites; usually smaller than JPG at similar visual quality. | Some portals and older software reject WebP files. |
| PNG | Screenshots, logos and graphics with flat colour. | Rarely small enough for a strict KB limit, so this tool does not output PNG. |
How to choose a target size
- Use the number on the form, then aim slightly under it. Some systems count 1 KB as 1,000 bytes and others as 1,024.
- Check dimensions as well. Many forms set a minimum width and height. If a very small target forces the tool to shrink the image below that, raise the target or crop closer instead.
- No stated limit? Around 200 to 500 KB keeps most photos looking good and is accepted by most email and messaging services.
Tips for sharper results
- Crop to what matters first: a face, a signature or the part of a document you need. Fewer pixels of background means more of the file budget for detail.
- Start from the best original you have. Compressing an already compressed copy loses detail twice.
- Scan or photograph documents flat and in even light. Shadows and glare add noise that costs bytes and hurts legibility.
- Use the comparison slider and zoom in on small text or faces before you download.
If the limit is very small, the tool reduces pixel dimensions as well as quality. Check that the form does not also require a minimum width or height.
Uploading a photo for a passport, visa or ID? Crop it to the right dimensions first with the passport and ID photo size tool, then compress it here if the form also sets a KB limit.
What happens to your image
The tool reads your file into your browser's memory, draws it onto a canvas, and encodes new versions there. No part of that is sent to a server, which you can confirm by turning off your internet connection after the page loads: it still works. Closing the tab clears the image. See the privacy policy for details.
Common sizes
20 KB
A small portrait or signature image. A full-size phone photo cannot fit at 20 KB without being shrunk a lot.
50 KB
A passport-style portrait, a cropped ID photo, or a single scanned line or stamp.
100 KB
A decent-quality portrait, a clear single-page document scan, or a web banner.
200 KB
A good-quality portrait, a certificate or ID scan, or a social-media-sized picture.
500 KB
Everyday photos, document scans in colour, and images for email or web pages.
Frequently asked questions
How do I compress an image to an exact size in KB?
Choose the image, type the size you need in KB and press compress. The tool re-encodes your image at different quality levels and, if needed, smaller pixel dimensions, and keeps the best result that fits under your target.
Is my image uploaded?
No. Everything runs in your browser, so the image never leaves your device.
Why is the result smaller than my target?
It picks the highest quality that still fits, so the file lands just under the number you set.
Can it compress HEIC photos?
Only in browsers that can open HEIC (Safari). Otherwise convert the photo to JPG first.
Why does a screenshot lose sharpness?
The tool outputs JPG or WebP, which are designed for photos. Sharp text and thin lines can soften at small sizes. Crop the screenshot to the part you need before compressing to keep more detail.
Does compressing change the shape of my image?
No. If the tool reduces the pixel dimensions, it scales width and height together so proportions stay the same.
Last reviewed .
Related tools
Passport & ID photo size
Crop to the right millimetres and pixels for a document.
Resize image to 20 KB
A small portrait or signature image. A full-size phone photo cannot fit at 20 KB without being shrunk a lot.
Resize image to 50 KB
A passport-style portrait, a cropped ID photo, or a single scanned line or stamp.
Resize image to 100 KB
A decent-quality portrait, a clear single-page document scan, or a web banner.