jpgtoolskit.org
JPG and photo utilities, in the browser
Say hi →

Compress JPG to a Target Size

target KB mode (100KB / 50KB / 200KB…) or quality mode · in-browser · batch

Compress JPEG images entirely in your browser — files never leave your device, so there's no upload cap and nothing to leak. Two modes: pick a quality level and see the size delta per file, or set a target file size in KB — the tool searches for the highest quality that fits under your limit, downscaling dimensions only if it has to. Built for upload forms with hard limits: visa applications, job portals, university forms, marketplace listings.

Drop JPG files here

JPG / PNG / WebP accepted · output is JPG · multiple allowed

    no files
    Ready.

    How to compress a JPG

    1. Drop one or more JPG files (PNG and WebP also work — they come out as JPG).
    2. Pick a mode. Quality level when you just want smaller files; Target file size when a form says "maximum 100 KB".
    3. Click Compress & download. Each output shows the before → after size, the savings percentage, and the quality the tool settled on.
    4. Batch results can be grabbed in one go with Download all (.zip).

    Common size targets

    Quality mode vs. target mode

    Quality mode applies one setting to every file — predictable look, unpredictable size. Target mode inverts that: predictable size, variable quality per file. Under the hood, target mode runs up to 8 encoding passes per file, narrowing in on the best quality that still fits. If a file can't fit even at the minimum quality, the tool shrinks the longest edge (in ~5% steps, never below 320px) and tries again — or, with downscaling off, hands you the smallest full-resolution file it could make and says so. If your photos are far larger than they need to be, run Resize JPG first — fewer pixels compress better than lower quality.

    FAQ

    How do I compress a JPG to exactly 100KB?

    Switch the mode to Target file size, type 100, and click Compress. The tool binary-searches the JPEG quality level until the output lands just under 100 KB. If even the lowest quality is still too big, it scales the dimensions down step by step (you can turn that off) until the target is met.

    Is it safe to compress photos here?

    Yes — compression runs entirely in your browser with JavaScript and the canvas API. Photos are never uploaded to a server, so nothing can be intercepted, logged, or retained. You can disconnect from the internet after the page loads and it keeps working.

    What quality should I use?

    0.7 is a strong default for photos — most people can't spot the difference from the original at normal viewing size. Use 0.5–0.6 for aggressive savings (visible artefacts in flat gradients like skies), and 0.85+ when the image will be examined closely or printed.

    Does compressing remove EXIF metadata?

    Only if you ask it to. Re-encoding through a canvas produces a file with no EXIF and no colour profile — a canvas knows about pixels and nothing else — so the EXIF, XMP and ICC blocks are read out of the original and spliced back into the result. Untick Keep EXIF, XMP and the colour profile and they are dropped, which is what you want before publishing a photo that carries a GPS fix. To strip metadata without touching the pixels at all, use Remove EXIF — that one is lossless.

    Will my photo come out rotated?

    No. The browser applies the EXIF orientation when it decodes the image, so the pixels the canvas produces are already upright — and copying the original orientation tag back would then tell the next viewer to rotate an already-rotated photo. The tag is rewritten to 1 as the block is copied, so the file says what is actually true of its pixels.

    Why did my file get <em>bigger</em>?

    Because you asked for a higher quality than it was saved at. The label under each result shows the source quality, read out of the file's own quantisation tables — if it says source ~q62% and you asked for 80%, the second encode has to faithfully store the losses of the first one, so the file grows and the picture is slightly worse. Pick a number below the source quality, or use target-size mode.

    Why is my compressed file bigger than the original?

    The source was already compressed harder than the quality you picked. The size delta is shown next to every output — if it's positive, keep the original. Re-compressing an already-optimised JPG at a higher quality setting always grows it.

    Related tools