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.

  1. Add images
  2. Choose settings
  3. Download
Output format

How to shrink
Resize (optional)

Leave blank to keep the original size. Images are scaled to fit and are never enlarged.

Your settingsChanging any option re-compresses your images automatically.
Files processed0
Total saved0 B
Average reduction0%
Original to result-

    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.

    1. 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.
    2. 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.
    3. 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.

    TargetRoughly fitsBest for
    20 KB370 x 370 px squareA small portrait or signature image. A full-size phone photo cannot fit at 20 KB without being shrunk a lot.
    50 KB584 x 584 px squareA passport-style portrait, a cropped ID photo, or a single scanned line or stamp.
    100 KB826 x 826 px squareA decent-quality portrait, a clear single-page document scan, or a web banner.
    200 KB1,168 x 1,168 px squareA good-quality portrait, a certificate or ID scan, or a social-media-sized picture.
    500 KB1,848 x 1,848 px squareEveryday photos, document scans in colour, and images for email or web pages.

    JPG, WebP or PNG?

    FormatGood forWatch out for
    JPGPhotos and scans; accepted almost everywhere, including most upload forms.Sharp text and thin lines can soften at small sizes. No transparency.
    WebPPhotos for websites; usually smaller than JPG at similar visual quality.Some portals and older software reject WebP files.
    PNGScreenshots, 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

    Tips for sharper results

    1. 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.
    2. Start from the best original you have. Compressing an already compressed copy loses detail twice.
    3. Scan or photograph documents flat and in even light. Shadows and glare add noise that costs bytes and hurts legibility.
    4. 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

    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 .