Skip to content

Image compressor. Smaller files, no upload.

Drop images here or click to browse, JPG, PNG, WebP, AVIF, GIF
Files never leave your browser

Why compress in the browser?

Most “free” compressors upload your photos to a server first. This one does the whole job locally with your device's own Canvas, faster, completely private, and it keeps working offline. It doubles as a compression calculator: re-encode a representative photo at a few quality levels and formats to find the smallest file that still looks right before you bake that setting into a build pipeline. Single & batch compression and one-click ZIP export are all free, with no sign-up and no limits.

§ · written guide

How to use the Image Compressor

This compressor makes image files smaller and shows you exactly how much each one saved. It draws every image onto a canvas in your browser and saves it again in the format and quality you pick, with an optional width cap. Use it to shrink photos before uploading them to a site or store, or to test which format and quality give the smallest file that still looks right.

Step by step

  1. Add your images

    Drop files on the card that says Drop images here, or click it to browse. On a keyboard, focus the card and press Enter. You can add many at once, and Add more brings in extra files later. Files that are not images are skipped.

  2. Pick the output format

    Choose from Output format. Keep original, the default, saves PNG as PNG, WebP as WebP, AVIF as AVIF and everything else, including GIF, as JPG. You can also force JPG (universal), WebP (modern), AVIF (smallest, modern) or PNG (lossless) for every file.

  3. Set the quality

    Drag the Quality slider between 10 and 100. The default is 80. It changes JPG, WebP and AVIF output; PNG is lossless and ignores it. Sizes recalculate a moment after you stop dragging.

  4. Cap the width if needed

    Type a number into Max width (px) to shrink any image wider than that, keeping its proportions. Leave it empty for no resize. Images already narrower than the cap keep their size.

  5. Check a file at full size

    Click any thumbnail to open a full size preview with its format, new size, dimensions and the percent saved. Close it with the × button, the Esc key or a click outside the preview.

  6. Download the results

    Press Download under a thumbnail, or Download this file in the preview, to save one image. Its name gets -min added, and the extension matches the output format, so photo.gif saved as JPG becomes photo-min.jpg. Press Download all (.zip) to save every file in one archive named dh-compressed.zip. Press Clear to start over.

Reading the result

  • Each thumbnail card shows the original size, an arrow and the new size, then the change in percent and the output width × height.
  • A green figure with a minus sign means the file got smaller. An orange figure with a plus sign means the new file is larger than the original, which can happen when a file was already well compressed or when PNG output is chosen for a photo.
  • The line above the buttons sums up the batch: the number of images, the total size before and after, and the overall percent saved.
  • If you choose AVIF and your browser cannot encode it, a message says so once and the files are saved as WebP instead. The format in the preview shows what you actually got.

Tips and common mistakes

  • Run one typical photo at a few quality settings and formats, then open each at full size. Pick the lowest setting that still looks clean on text edges and flat color.
  • Use PNG (lossless) for logos, icons and screenshots with transparent areas. JPG cannot store transparency.
  • Set Max width (px) to the largest width the image will actually be shown at. Resizing a 4000 pixel photo down often saves more than lowering the quality.
  • Animated GIFs come out as a single still frame. Use a video or GIF tool if you need to keep the animation.
  • Saving through the canvas does not keep camera metadata such as EXIF location and date, which is usually what you want for web images.

Privacy and limits

Every image is decoded and saved again by your browser on your own device. Nothing is uploaded and nothing is stored, so closing the tab or pressing Clear removes it all. AVIF output depends on your browser's support. Very large batches use a lot of memory because every file is processed in the tab.

Back to the tool

§ 02 · what you can do

Shrink the batch, keep the quality.

Batch compressionDrop one image or a whole folder, JPG, PNG, WebP, AVIF or GIF, and re-encode them all in a single pass, no upload.
Switch output formatConvert to JPG, WebP, AVIF or lossless PNG, or keep each file's original format, with one dropdown.
Live quality sliderDrag the quality control and watch every file's new size and savings percentage update instantly.
Downscale by max widthCap the width in pixels to shrink oversized photos before compression, aspect ratio is preserved.
Full-size previewClick any thumbnail to inspect the compressed result at full size, with format, size and savings, before you download.
One-click ZIP exportDownload any single file, or grab the entire compressed batch as one ZIP archive with one click.
§ 04 · faq

Frequently asked questions.

Are my images uploaded anywhere?
No. Compression happens entirely in your browser using the native canvas API. The page is static; the only network request is the initial page load, and image data never leaves the tab. Safe for unpublished marketing assets or customer-supplied media you would not want sent to a third-party service.
What's the size difference across JPEG, WebP and AVIF?
On a typical photo at quality 80, JPEG is the baseline. WebP is roughly 25-35% smaller than JPEG at visually equivalent quality; AVIF is roughly 20-30% smaller than WebP (about 50% smaller than JPEG). Browser support: JPEG everywhere, WebP everywhere since 2020, AVIF in all major browsers since 2024. For modern web work, ship AVIF with WebP and JPEG fallbacks.
What quality level should I use?
Quality 80-85 is the production sweet spot for photographs: visually indistinguishable from the original to most viewers, with a file 30-50% smaller. Below 60 you start to see artifacts in flat color regions and around text edges; above 90 the marginal gain is invisible while the file gets bigger. Ship heroes at 90, body images and product thumbnails at 80, and grid thumbnails at 60.
Does this work on PNG and animated GIF?
PNG inputs work. Re-encoding to JPEG, WebP or AVIF is lossy and drops transparency; for images that must keep an alpha channel (logos, icons) choose the PNG (lossless) output. For animated GIF, only the first frame is processed, for animation conversion use ffmpeg or a dedicated tool. PNG with no transparency converts cleanly to JPEG with significant savings.
Why does AVIF sometimes fall back to WebP?
Browser support for AVIF encoding varies (Chrome and Edge since 2021, Firefox since 2024, Safari 16+). On browsers that can't encode it, the canvas toBlob() call for AVIF returns nothing, so the tool falls back to WebP and shows a notice. Browsers that can't encode AVIF can usually still decode it, so AVIF as a delivery format works everywhere, only the conversion step is restricted here.
What about responsive images and srcset?
This tool generates one variant per file at one size (with optional max-width downscaling). For production responsive images you usually want 3-4 sizes per format for a srcset attribute, build pipelines like Next.js's Image component, Sharp or Squoosh CLI handle that multi-size generation. Use this tool for the per-variant audit and one-off optimization.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply