Image Compressor
Compress JPEG, PNG or WebP in your browser. Cap the long edge, set quality, compare file sizes and download. Nothing is uploaded.
Drop an image here, or click to browse
JPEG, PNG, WebP, GIF or SVG. Stays in your browser.
Compression runs in your browser with the Canvas API. Nothing is uploaded. Animated GIFs become a single frame. SVG is rasterised at its intrinsic size.
Why compress images before you upload them
Photographs from phones are often several megabytes. That is more than a web page, an email, or a CMS upload limit needs. Compression reduces those bytes by discarding detail the eye is unlikely to notice — typically by encoding as JPEG or WebP at a chosen quality, and by shrinking the longest side so a 4000-pixel photo is not served at 4000 pixels on a 1200-pixel article.
JPEG and WebP are lossy: each pass throws some information away. PNG is lossless and keeps sharp edges and transparency, but it rarely beats JPEG on photos. WebP usually wins on size at a given visual quality in current browsers. This tool never upscales; the max-edge setting only shrinks images that are larger than the cap.
Animated GIFs become a single frame because the Canvas API draws one bitmap. SVG is rasterised. If you need the original vector, keep the SVG. All of this runs in your browser — the file is not uploaded.
A practical workflow: cap the long edge at 1920 for web articles, 1200 for social posts, and use JPEG quality around 70–80 or WebP around 75. Compare the before/after sizes on this page before you download.
Do not compress a file that is already a tiny PNG icon, and do not re-compress a JPEG many times — each pass adds artefacts. Start from the original when you can.
Two ways the file gets smaller
The compressor combines two independent savings. The longest-edge limit (1920 pixels by default) scales large photos down without ever enlarging small ones — a 4000×3000 phone photo becomes 1920×1440, less than a quarter of the pixels. The quality setting (75% by default) then controls how aggressively JPEG or WebP encode those pixels. Reducing dimensions usually saves more than lowering quality.
If a combination of settings would produce a file that is not smaller than the original — common for images that were already optimised — the tool warns you, so you can keep the original instead.
Settings for common jobs
- Website photos: longest edge 1600–2000 px, JPEG quality 70–80 or WebP 70–75.
- Email attachments: longest edge 1280–1600 px and quality around 70 keeps a photo well under 1 MB.
- Upload forms with a size cap (often 1–2 MB): start at 1920 px and quality 75, then lower the edge before the quality.
- Screenshots and diagrams with text: use PNG, or WebP at high quality — JPEG blurs sharp text edges.
Why lower quality is not always smaller
File size depends on image content as much as on settings. Smooth skies and blurred backgrounds compress very well; grass, gravel, fabric and camera noise do not. A screenshot saved as JPEG can come out larger than the original PNG, because flat colours and sharp edges are exactly what PNG is good at. Compare the before and after figures and the preview rather than relying on the slider alone.
Checking the result
Look at the preview at full size on the areas compression damages first: faces and skin, which turn waxy; blue skies, which show banding; and edges of text or logos, which grow halos. If any of those look wrong, raise the quality a step or use WebP, which degrades more gracefully than JPEG at low settings.
In-depth guides
- Image Formats for the Web: JPEG vs PNG vs WebP vs AVIF vs SVG
Which format to use for photos, screenshots, logos and transparency, how to size images for high-density screens, and the HTML that loads them fast.
Related tools
These free tools pair well with this page — open them in a new tab to finish your workflow.
Frequently Asked Questions
Is the image uploaded to a server?
No. The file is read with the browser File API, drawn on a canvas, and encoded locally. You can disconnect from the network after the page has loaded and the tool still works.
What does the quality slider do?
For JPEG and WebP it is the encoder quality (roughly 10–100%). Lower values make a smaller file with more artefacts. PNG is lossless, so the slider is ignored — PNG size is driven by pixel count and how compressible the picture is.
Will it make my image larger?
The max-edge setting never upscales. If the photo is already smaller than the cap, only the format and quality change. A high-quality JPEG of a small PNG icon can sometimes grow; in that case keep PNG or lower the quality.
What happens to animated GIFs and SVG?
The canvas sees a single bitmap, so animations become one frame and SVG is rasterised at its intrinsic size. Keep the original if you need motion or vectors.
Which format should I pick?
JPEG for photographs, PNG for screenshots and graphics with sharp edges or transparency, WebP when you want a smaller file and your destination supports it (all current browsers do).
Is EXIF (location, camera) kept?
No. Re-encoding through canvas strips metadata. That is usually what you want before posting a photo publicly.
How small can I go before it looks bad?
For web photos, JPEG quality around 70–80 or WebP around 75 with a 1920px long edge is a common sweet spot. Use the on-page preview rather than a fixed number — faces and text fall apart first.