Image Compressor

Compress JPEG, PNG, and WebP images in your browser. Adjust quality, resize on the long edge, and shrink file size — runs in your browser, no upload.

  • Runs in your browser
  • Your data never leaves your browser
  • Free · No Sign-Up
Output format: Choose Keep original, JPEG, PNG or WebP before importing. Settings do not recompress existing results; select the files again. JPEG replaces transparency with white. If the browser outputs PNG instead, the download uses .png and the card explains the fallback.
Quality is 1–100, with a default of 75, for JPEG and WebP. PNG is lossless and ignores this value; the slider is disabled for PNG output or Keep original with a PNG first in the batch. Set quality before importing again.
px
Enable Resize long edge to before importing. The default is 1920 px. Images above the limit shrink proportionally; smaller images are not enlarged. The numeric input offers 64–16384 px. Reimport to apply changes.
Images Select or drop JPEG, PNG, WebP or GIF files for automatic local compression. Each file is limited to 50 MB (50 × 1024 × 1024 bytes). Animation becomes a still image, and re-encoding drops metadata. Up to three images are processed at once.
Download Each card shows dimensions and byte sizes before and after compression. A larger output is marked in red. Download saves one result; Download All starts one download per successful file, without a ZIP. The browser may ask to allow multiple downloads.

Drop images here, or click to select

JPEG / PNG / WebP / GIF · up to 50 MB each

Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.

Quality vs File Size

Quality controls the lossy compression rate for JPEG and WebP outputs. Numbers above 90 produce nearly transparent compression — file size stays high. Numbers below 60 introduce visible artefacts on smooth gradients and skin tones. The tool starts at 75 as a middle setting; compare the preview with the original before you settle on a lower value.

Example: A Web Page Screenshot

A 1366×900 PNG screenshot of a web page (140.3 KB, taken in Chromium) at the default quality 75:

  • Keep original (PNG): 197.7 KB, +41.0%. The browser’s PNG encoder compresses less tightly than the tool that wrote the original, so re-encoding a PNG can make it larger. Keep the original file in that case.
  • WebP: 42.6 KB, −69.6%.
  • JPEG: 87.0 KB, −38.0%. Text edges in screenshots show JPEG ringing sooner than photos do; WebP is the better target for UI captures.

Format Cheat Sheet

  • JPEG — photographs, hero shots, anything with continuous tonal gradients. No transparency.
  • PNG — UI screenshots, diagrams, anything with hard edges or transparency. Lossless.
  • WebP — modern browsers everywhere; usually 25–35% smaller than JPEG or PNG at equal quality. Supports transparency.
  • Keep original — useful when you just want to resize without converting formats.

Resize the Long Edge

Most web layouts max out around 1920 pixels wide. Retina (2× DPR) screens benefit from 2560–3840. When you set the long edge limit, the tool scales the shorter edge proportionally so aspect ratio is preserved. For thumbnails or social previews, try 1024 or 1440 px on the long edge.

Privacy: Nothing Is Uploaded

This tool uses createImageBitmap and the Canvas 2D API to decode and re-encode images in your browser. The compressed file is constructed locally by canvas.convertToBlob (or canvas.toBlob as a fallback) and served to you via a temporary blob URL. There is no server endpoint involved — try it in airplane mode if you want to confirm.

Limits

  • Maximum 50 MB per file (mobile browsers run out of memory on much larger inputs).
  • Animated GIFs are flattened to the first frame by design — for animated GIF re-encoding, use ffmpeg locally.
  • EXIF orientation is auto-applied: photos taken sideways come out the right way up.
  • Re-encoding through a canvas drops all metadata: EXIF (including GPS location), XMP and the ICC color profile. Removing GPS is often what you want before sharing a photo; losing a Display P3 or Adobe RGB profile can make saturated colors look duller.
  • Transparent areas become white when the output is JPEG.
  • If the browser has no encoder for the chosen output format, the HTML standard makes the canvas produce PNG instead. The tool then names the file .png and shows a note under the result. A GIF with Keep original always comes out as PNG, because browsers cannot encode GIF from a canvas.

Related Tools

  • WebP Converter — when you specifically need PNG/JPG ⇄ WebP conversion with a simpler UI.
  • SVG Optimizer — vector images cannot be raster-compressed; optimize SVG source instead.
  • Image to Base64 — when you need to inline an image as a data URL.

FAQ

Are my images uploaded anywhere?

No. Every byte stays in your browser. The compression runs on Canvas 2D APIs locally, and the output file is created by your browser. ZeroTool never sees your images.

Which formats does it support?

Input: JPEG, PNG, WebP, and single-frame GIF (animated GIFs are flattened to the first frame by design). Output: JPEG, PNG, or WebP. For HEIC, TIFF, or RAW, use a local tool such as exiftool or ImageMagick — browsers cannot decode these formats. For SVG, use our SVG Optimizer instead.

Why is the quality slider disabled for PNG?

PNG is a lossless format — browsers do not accept a quality parameter when encoding PNG. To shrink a PNG with this tool, either resize its long edge or convert the output to JPEG / WebP. For deeper lossless PNG optimization, run a dedicated tool such as oxipng locally.

Why is my output sometimes larger than the input?

Re-encoding an already optimized image can grow it, especially when you switch a PNG screenshot to high-quality JPEG. The tool flags this with a red percentage so you can drop the larger output and keep the original.

Is there a file size limit?

Yes — 50 MB per file, to protect mobile browsers from running out of memory. There is no limit on total batch size, but very large batches will be slower.