Free online image compressor. Reduce JPEG, PNG, WebP file sizes to a specific target while maintaining quality. 100% client-side processing.
Most compression tools give you a quality slider and leave you to guess. This one works the other way round: you say how big the file is allowed to be — 200 KB, 2 MB, whatever the form you are fighting with demands — and the tool finds the highest quality setting that fits underneath that number. That is usually the actual problem. Nobody wakes up wanting quality 71; they want a photo under the 5 MB limit on a job application with as little visible damage as possible.
Drop your images in, type a target size, pick KB or MB, and press Compress. Everything happens locally: files are decoded, re-encoded and downloaded inside your browser, with no upload and no server-side copy. Up to 100 MB per file, and you can queue a batch. JPEG, PNG, WebP, GIF, BMP, AVIF, TIFF, HEIC and ICO files are accepted as input, subject to your browser being able to decode them — HEIC in particular decodes on some platforms and not others.
The tool runs a binary search over the encoder's quality parameter. It encodes at a mid-point quality, measures the resulting bytes, and moves the search window up or down depending on whether the result came in under your target — converging over a series of passes on the highest quality that still fits. It reports the quality it settled on for each file, so you can see how hard it had to work.
This matters because the relationship between quality and file size is not linear and is different for every image. A flat studio shot on a white background might reach 200 KB at quality 90; a detailed forest photo of identical dimensions might need quality 45 for the same target. A single fixed quality setting applied to a mixed batch will overshoot on some files and needlessly damage others. Searching per image is what makes a byte target achievable without over-compressing the easy ones.
Sometimes there is no quality setting that gets a file under the target. A 24-megapixel photo cannot be squeezed into 50 KB by quality reduction alone — there are simply too many pixels, and even at the encoder's floor the file stays too large.
For that case there is an "allow dimension resize" option, on by default. When quality alone fails, the tool reduces the pixel dimensions in steps and retries the quality search at each smaller size, stopping as soon as a result fits. A companion slider sets how far it is allowed to go, from 100% of the original dimensions (never resize) down to 25%. Any file whose dimensions were changed is flagged in the results, and the output dimensions are shown next to the original ones, so a resize never happens silently.
Which lever you should prefer depends on the job:
Compression comes in two kinds, and the difference decides what is achievable.
Lossless compression rewrites the data more efficiently and reconstructs the original pixels exactly. PNG is lossless: it predicts each pixel from its neighbours, stores the difference, and DEFLATE-compresses the result. Nothing is discarded, which is why it is right for screenshots, logos and anything you will edit again — and why its file sizes are not negotiable. There is no quality dial in PNG. The browser's PNG encoder takes no quality parameter at all.
Lossy compression discards information your visual system is least likely to miss, and cannot get it back. JPEG and WebP both work this way, transforming the image in small blocks, keeping the coarse structure and throwing away fine high-frequency detail, and storing colour at lower resolution than brightness because the eye is more sensitive to brightness. This is where large savings live.
The practical consequence: if you keep PNG output, the only way this tool can reduce the file is by making the image smaller in pixels. If you are targeting a demanding size and the format is PNG, either enable resizing or accept that the target will not be met. The format dropdown offers "same as input" (the default), JPEG, PNG or WebP, but format choice is a decision about the destination, and the byte target is what this page is really for.
| Lossless (PNG) | Lossy (JPEG, WebP) | |
|---|---|---|
| Pixels recovered exactly | Yes | No |
| Quality setting | None — ignored by the encoder | Yes, and it is the main lever |
| Typical savings on a photo | Modest | Large |
| Safe to re-save repeatedly | Yes | No — damage accumulates |
| Best for | Screenshots, flat graphics, masters | Photographs, web delivery |
| How a byte target is reached | Only by reducing dimensions | Quality first, dimensions as a fallback |
Understanding this makes targets realistic instead of arbitrary. Four things dominate.
Metadata is a smaller factor but not nothing. Re-encoding through a canvas produces a clean file with no EXIF block, so camera settings, timestamps, editing history and any embedded GPS coordinates are dropped. That is a genuine privacy benefit when posting photos publicly, and something to be aware of if you were relying on the metadata for cataloguing.
Some starting points, to be adjusted by looking at the result rather than trusting the number:
| Use | Reasonable target | Notes |
|---|---|---|
| Full-width web hero image | 150–300 KB | Resize to the display width first; the dimensions matter more than the target |
| In-article photo | 80–150 KB | WebP output gets you further at the same target |
| Thumbnail or avatar | Under 30 KB | Small dimensions do most of the work |
| Email attachment | Under 1 MB per image | Keeps a batch under most gateway limits |
| Upload form with a stated cap | Slightly under the cap | Leave headroom; some systems count the encoded upload, not the file |
| Archive copy | Do not compress | Keep the original as the master |
The target box accepts fractional values, so a 500 KB goal can be entered as 500 KB or 0.5 MB. Note that KB and MB here are the binary units your operating system usually reports, which is why a "1 MB" output may show as slightly over 1,000,000 bytes elsewhere — leave a little headroom against a hard limit.
The output is not a mystery you have to accept. Each completed file opens a before-and-after comparison with a draggable divider, and you can zoom in to inspect the image at the pixel level and pan around while zoomed. Compression artefacts are frequently invisible at fit-to-screen size and obvious at 400%, so judging at full-page scale is how people ship images that look bad on someone else's monitor.
What to look for, in the order it usually appears as quality falls:
Two sanity checks. Compare at the size the image will actually be viewed — artefacts that vanish at display size are not worth spending bytes on. And check the reported quality figure: if the tool had to drop very low to reach your target, either the target is unrealistic for that image or the image should be resized instead.
-compressed suffix and the extension of the chosen format.And the question everyone asks first: no, your images are not uploaded. Decoding, the quality search, any resizing and the download all run in your browser. Once the page has loaded, the compression works with the network disconnected, which is the reassuring test if you are handling photographs you would rather not post to a stranger's server.
Image compression reduces the file size of images by removing redundant data (lossless compression) or by selectively discarding visual information that is less perceptible to the human eye (lossy compression). Smaller image files load faster, consume less bandwidth, reduce storage costs, and improve website performance — directly impacting SEO rankings, user experience, and conversion rates.
Google reports that 53% of mobile visitors abandon sites that take more than 3 seconds to load, and images typically account for 50-80% of a web page's total weight. Image compression is one of the highest-impact performance optimizations available.
| Type | How It Works | Quality Loss | Best For |
|---|---|---|---|
| Lossless | Removes redundant data without discarding information | None — pixel-perfect | Graphics, screenshots, text images, medical imaging |
| Lossy | Discards visual detail below perceptual threshold | Minimal at high quality settings | Photographs, web images, thumbnails |
| Near-lossless | Applies minimal lossy compression with negligible visual impact | Imperceptible | High-quality web images, product photos |
| Format | Compression | Typical Savings (vs uncompressed) | Quality |
|---|---|---|---|
| PNG | Lossless | 50-70% | Perfect |
| JPEG (quality 80) | Lossy | 90-95% | Good — fine for photographs |
| WebP (quality 80) | Lossy | 93-97% | Good — 25% smaller than JPEG |
| AVIF (quality 60) | Lossy | 95-98% | Good — 50% smaller than JPEG |