Compress Image
Compress JPG, PNG, and WebP images — free, unlimited, and entirely private. Nothing leaves your browser.
Drop files here or click to choose
🔒 Your files never leave your browserHow it works
Every extra kilobyte in an image slows down the page it's on. This tool compresses JPG, PNG, and WebP images directly inside your browser tab — no server, no upload, no waiting in a queue. JPEG compression uses the mozjpeg encoder for a smaller result than a browser's built-in encoder at the same visual quality; WebP compression uses the same libwebp encoder as the WebP converters, with the same quality dial; PNG compression uses oxipng, a lossless re-packer that finds a smaller equivalent encoding without touching a single pixel.
In target-size mode, Moyang tries several quality levels in your browser — a binary search that typically converges in 5-7 attempts — until it finds the highest quality that still fits your target size, like compress image to 100kb. This works for both JPG and WebP; PNG has no equivalent quality dial (it's lossless by design), so if optimization alone can't reach the target, the image is scaled down instead.
Because everything runs locally, there's no 10-compressions-a-day limit and no file size cap — the kind of restrictions server-based compressors impose to control their hosting bill. Compress one file or fifty; once a batch is done, download every result at once as a single ZIP.
Limitations
JPG, PNG, and WebP are supported for compression — use the AVIF or HEIC converters first for those formats, since neither has a compressor here yet. Animated WebP files are compressed as a still image of the first frame only, same as the WebP converters elsewhere on this site. PNG's file size reduction is bounded by its lossless design; if you need much smaller PNGs, converting to WebP first usually helps more than any PNG-specific compression can. Images over 100 megapixels aren't processed — decoding runs entirely in your browser's memory, and a file that large risks crashing the tab.
Compress an image to a target size
Need a photo under a specific size — 100 KB for a web form, 1 MB for an email attachment limit? Switch to "To target size" mode above and pick one of the four presets: 100 KB, 200 KB, 500 KB, or 1 MB. Moyang runs a binary search over quality levels directly in your browser, typically converging in 5-7 tries, until it lands on the highest quality that still fits under your chosen size. If quality alone can't get there — a very large or highly detailed photo, for instance — the image is downscaled as a fallback, since there's a real floor to how small a given resolution can get before quality collapses entirely.
PNG doesn't have a quality dial to search over — it's lossless by design — so target-size mode on a PNG relies on downscaling once oxipng's lossless re-encoding hits its own floor. If you need a PNG dramatically smaller than the original, converting to WebP first, then compressing that here, usually gets further than any PNG-specific trick can.
FAQ
- Is this image compressor really free?
- Yes — completely free, with no file size limits, no daily quota, and no account required. All compression happens in your browser, so there's no server cost to recoup.
- Can I compress an image to an exact size, like 100KB?
- Yes — switch to target-size mode, enter your target (e.g. 100 KB), and Moyang searches for the highest quality (JPEG or WebP) that still fits within it, trying several quality levels in your browser until it converges. PNG has no tunable quality dial, so if quality alone cannot reach the target, the image is also scaled down.
- Which image formats can this tool compress?
- JPG, PNG, and WebP. For AVIF or HEIC, convert to JPG or PNG first — those converters already produce a reasonably small file, but you can run the result through this compressor again for a smaller one.
- What happens to EXIF metadata like camera info or GPS location?
- Metadata is stripped by default for privacy — the compressed file has no camera make/model, GPS coordinates, or timestamps unless you tick "Keep metadata" before converting. This only applies to JPEG; PNG and WebP re-encoding strips metadata regardless of that setting.
- Will compressing ever make my image worse than the original?
- No — if the compressed result would end up larger than your original file, Moyang just gives you the original back instead, with a note that it's already optimal.