Compress an image to 2 MB
Shrink large JPG, PNG, WebP or HEIC files to under 2 MB privately in your browser.
Drop a photo here, or tap to choose
JPG · PNG · WEBP · HEIC — files never leave your browser
2 MB is a common ceiling for WordPress media uploads, Jira/Confluence attachments, and many SaaS image fields. Drop a JPG, PNG, WebP or HEIC and the tool encodes it to fit under 2 MB while keeping pixel dimensions unchanged where possible.
What needs a 2 MB photo?
2 MB is generous enough for high-resolution photographs at full web display sizes (1920×1080 hero images, retina product shots).
How the compressor hits 2 MB
We binary-search the JPEG quality between 0.40 and 0.95 to find the highest setting whose encoded output fits under 2 MB. For most photos at typical document dimensions this lands within 1.5 KB of the target after 6–8 iterations. If quality 0.40 still overshoots, we progressively scale the canvas down by 10% and try again — the editor only ever reduces resolution as a last resort.
What if the output is still too big?
- Reduce pixel dimensions. A 600×600 photo can never shrink to 2 MB as far as a 413×531 one can. Switch the size mode to a passport preset, or set custom pixel dimensions.
- Switch format to WebP. WebP typically gives 25–35% smaller files at equivalent quality. Some upload portals reject it, so check the spec page first.
- Crop tighter. Less background means less detail to encode, which lets the encoder use more bits on the face.
How to use this page
- Drop your JPG, PNG, WebP or HEIC photo above.
- Pick a size preset (passport, square avatar, custom pixels) — or leave it on "Free" to keep the original dimensions.
- The target is already set to 2 MB. Click Generate and download.
Privacy
Every step happens inside the browser tab you have open. Your image is decoded, cropped and re-encoded by the same JavaScript engine that runs this page — there is no upload, no temporary file on a server, and no "processed copy" cached by us afterwards. When you close the tab, the blob is gone. We document the full pipeline on our Methodology and How it works pages.
FAQ
When do I need a 2 MB limit?
Will the photo still look sharp?
Does this work for HEIC iPhone photos?
Is anything uploaded?
Does compressing to 2 MB blur the photo?
For a 413×531 px passport photo at 2 MB, the output is visually indistinguishable from the original on a phone or laptop screen. Below ~30 KB at the same dimensions you start to see mild softening; below ~15 KB JPEG block artifacts become visible.
Will the file be exactly under 2 MB?
The compressor stops the search at the first quality that fits, so the output is guaranteed to be ≤ 2 MB. You'll usually land 1–5 KB under the limit.
What happens to my image after I close the tab?
It is freed from your browser's memory like any other image you opened. We never received it, so we have nothing to delete on our side. See Trust & Safety for the full policy.