Image compressor
Compress images by quality or to a target file size, in batches, with the original never leaving your device.
Optional. Height follows automatically.
80 is the usual sweet spot - visually identical to most eyes at roughly half the size.
Drag files here, or
JPEG, PNG, WebP, AVIF and GIF. Decoded on your device - never uploaded.
Ready · runs on your device
Nothing is uploaded. This tool runs entirely inside your browser tab. Your files and figures stay on your device - we never receive them, so we cannot read, store or lose them.
How compression works here
Your image is decoded to pixels in your browser, drawn to a canvas, and re-encoded at your chosen quality using the browser’s own encoder. Nothing is transmitted at any stage.
For lossy formats - JPEG, WebP, AVIF - the quality setting controls how aggressively fine detail is discarded. The encoder works on 8×8 blocks of the image, keeping the coarse structure your eye notices and throwing away the fine variation it does not. Lower quality means more discarded, smaller files, and eventually visible blocking around edges.
Choosing a format
| Format | Best for | Typical saving vs JPEG |
|---|---|---|
| JPEG | Photographs, anything without transparency | baseline |
| WebP | Almost everything; supports transparency | 25–35% smaller |
| AVIF | Maximum compression, modern browsers | 40–50% smaller |
| PNG | Screenshots, logos, flat colour, transparency | usually larger for photos |
WebP is the pragmatic default in 2026 - supported by every current browser, meaningfully smaller than JPEG, and it handles transparency so it can replace PNG for many graphics too.
AVIF compresses best but encodes slowly, particularly on phones. For a batch of fifty images that difference is felt.
Target size versus target quality
By quality is right when you want consistent visual fidelity across a set of images and do not care what each one weighs.
To a file size is right when something external imposes a hard limit - a government portal capping uploads at 1 MB, a job board at 500 KB, an email attachment budget. The tool encodes repeatedly, bisecting the quality setting, until it finds the highest quality that fits under your ceiling. Eight iterations land within a fraction of a percent of the ideal.
Resizing is the bigger lever
Compression quality is a modest dial compared with dimensions. A 4,000-pixel-wide photo displayed in a 800-pixel column carries 25 times more pixels than it needs.
| Change | Typical size effect |
|---|---|
| Quality 95 → 80 | ~50% smaller |
| Quality 80 → 60 | ~30% smaller |
| Width 4000px → 1600px | ~84% smaller |
If a file is far too large, cap the width first and adjust quality second. The width limit in this tool applies before encoding, so the two work together.
When an image gets larger
Re-encoding an already-compressed image at a higher quality than it was originally saved with adds bytes without adding detail - the lost information is gone and cannot return. If the tool reports a size increase, the original was already compressed harder than your current setting. Lower the quality, or keep the original.
Generation loss is real: every save-and-recompress cycle degrades a lossy image a little further. Always compress from the highest-quality original you have, never from a file that has already been through the process.
Metadata
Re-encoding through a canvas drops EXIF data - camera model, lens, settings, and any GPS coordinates recorded at capture. For publishing to the web that is a privacy benefit, since location data in a photo is a genuine disclosure. If you need the metadata preserved, keep your original file alongside the compressed one.
Common questions
How is this different from other compressors?
Your photos are never uploaded. Every other popular compressor sends your image to a server, processes it there and sends it back - which means a copy existed on someone else's machine, however briefly. This one decodes and re-encodes entirely in your browser, so you can compress client photos, ID documents or anything else confidential without a transfer ever happening.
Why did my PNG get bigger?
PNG is lossless, so there is no quality dial to turn. If your PNG came from an optimised source, re-encoding through the browser's generic encoder can produce a slightly larger file. For photographs, converting to JPEG or WebP will shrink dramatically; for screenshots and graphics with flat colour, the original PNG is often already close to optimal.
What quality should I use?
80 is the standard answer for photographs and is genuinely hard to distinguish from the original. Below 60, artefacts become visible in smooth gradients like skies. Above 90, file size grows steeply for almost no perceptible gain. Detailed textures tolerate lower quality than flat areas do.
Can I compress to an exact file size?
Yes - switch to "To a file size" and enter a target in KB. The tool bisects the quality setting until the result fits, which is what you want when an upload form rejects anything over 2 MB or a job application caps a photo at 500 KB.
Last reviewed