Image & Media

Image Compressor

Shrink an image's file size with adjustable quality and resizing, converting between JPEG, WebP, and PNG. Runs entirely in your browser; nothing you upload is ever sent anywhere.

Drop an image here, or click to choose one

Output Format
Choose an image to compress it.

Quick Learn

Image file size mostly comes down to two things: how many pixels the image has, and how aggressively those pixels are compressed. JPEG and WebP are lossy formats — they throw away some visual detail in exchange for a much smaller file, and a "quality" setting controls how much detail gets sacrificed. PNG is lossless — it never throws away detail, which is why it's the right choice for screenshots and graphics with sharp edges, but also why it rarely shrinks much just by re-saving it.

This tool redraws your image onto a canvas — optionally resized to a maximum width — and re-encodes it at your chosen format and quality, entirely in your browser using the same canvas APIs every browser ships with. Nothing you upload is sent anywhere; the "upload" box is just a local file picker.

Best Practices

  • •For the biggest size reduction, convert PNG photos to JPEG or WebP — PNG's lossless compression is the reason a re-saved PNG often barely shrinks, while switching format can cut size dramatically.
  • •Keep PNG only when you need transparency or the image has flat colors and sharp edges (logos, screenshots, diagrams) — those compress worse as JPEG and can show visible artifacts.
  • •Quality 70-85% is usually visually indistinguishable from the original for photos, while meaningfully smaller — there's rarely a reason to go above 90% unless the image will be cropped or zoomed later.
  • •Resizing (Max Width) often saves more than lowering quality does — an image displayed at 800px wide gains nothing from being stored at 4000px, no matter how high the quality setting.

More Image & Media Tools

See all Image & Media tools

Frequently Asked Questions

Is my image uploaded anywhere?

No. The file picker just reads the image locally, and compression happens entirely in your browser using canvas APIs — nothing is sent to a server or stored anywhere.

Why didn't PNG output get smaller?

PNG is a lossless format, and browsers don't expose a way to tune PNG's compression level through canvas — re-saving a PNG mostly just re-encodes the same pixels the same way. If file size matters more than pixel-perfect fidelity, convert to JPEG or WebP instead.

Why did my image turn white where it used to be transparent?

JPEG has no alpha channel, so any transparent area gets filled with white before compressing. If you need to keep transparency, choose WebP or PNG instead of JPEG.

What does Max Width actually do?

If set, and the image is wider than that value, it's scaled down (preserving aspect ratio) before compression. It's optional — leave it blank to compress at the original dimensions.

Why is WebP not as small as I expected?

WebP's compression efficiency depends on the encoder settings a browser's canvas implementation uses internally, which this tool doesn't control beyond the quality value — for most photos it still comes out smaller than an equivalent-quality JPEG, but the exact gap varies by browser.

Want the engineering deep-dives behind tools like this one?