Loading...
Loading...
Shrink JPG, PNG, and WebP files with a live quality slider and a side-by-side preview. Everything runs in your browser — no upload, no signup, no watermark.
Image compression reduces a file's size on disk so it loads faster, costs less to store, and stays under upload limits — without changing what the picture looks like at typical viewing sizes. JPEG and WebP use lossy compression: small visual details the human eye barely notices are discarded so far fewer bytes are needed. PNG uses lossless compression: every pixel is preserved exactly, and only the encoding is squeezed. This tool lets you re-encode any JPG, PNG, or WebP at a quality level you control, optionally resize it, and inspect the result side-by-side with the original before you download. Everything runs locally — your file never leaves the device.
Drag a JPG, PNG, or WebP onto the upload area, or click to pick from your device. Files up to 50 MB are supported.
Use WebP for the best size-to-quality ratio on the modern web. Stick with JPG for broad compatibility, or PNG when you need lossless or transparency.
Quality 80 is a good default for photos. Lower values shrink the file more but introduce blocking; higher values look closer to the source but save less space.
Resizing to 1920 px or 2400 px is the single biggest win for photos that will be viewed on a screen. The aspect ratio is preserved automatically.
The before and after panes update live with file sizes and percentage saved. Click Download compressed when you are happy with the trade-off.
1. Decode the file into an ImageBitmap on a worker-friendly canvas. 2. Optionally resize the bitmap to fit a maximum long-edge constraint. 3. Draw the bitmap into an OffscreenCanvas at the target dimensions. 4. Call canvas.toBlob(format, quality) to re-encode with the chosen settings. 5. Compare blob.size against the original and surface the savings ratio. 6. Hand the blob to the browser as a downloadable object URL.
Modern browsers ship a full image-encoder pipeline behind the Canvas API. Drawing pixels onto a canvas and calling toBlob with 'image/webp' or 'image/jpeg' invokes the same codec the browser uses for everything else, so you get hardware-accelerated encoding and predictable output. PNG is always lossless because the spec does not define a quality knob; the size win for PNG comes from resizing or from converting to WebP/JPEG when transparency is not needed.
Reference: MDN — HTMLCanvasElement.toBlob()
| Input | Typical result |
|---|---|
12 MB phone photo (4032×3024 JPG) | Resize to 1920 px and re-encode WebP at 80 → roughly 200–400 KB with no visible quality drop. Best fit for blog and social use. |
2 MB product photo on white (PNG) | Convert to WebP at 90 → typically 80–200 KB while keeping near-lossless edges. Great for ecommerce listings. |
Screenshot of a UI (PNG with text) | Keep PNG to preserve crisp text. Resizing the long edge to actual display size still cuts size by 40–70%. Avoid lossy formats on text. |
Already-compressed JPG at quality 75 | Re-encoding at quality 75 saves little and slightly degrades the image. Lower the quality or resize to see real savings. Edge case — already optimised. |
Cut out the subject from any photo with on-device AI — no upload required.
Adjust, filter, rotate and crop photos in the browser — no uploads, no watermark.
Compose memes and screenshot collages with real layers — paste, drag, crop, caption, export.
Convert HEIC, JPG, PNG, WebP, and more — batch up to 25 files, all in your browser.
Last updated