utills.
Image Guides

How to Compress Images Without Losing Quality

The real reasons image files get big, the difference between lossy and lossless, and the best free ways to shrink JPGs and PNGs on Mac, Windows, and in your browser.

Illustration for: How to Compress Images Without Losing Quality

Free tool

Want to just do it now? Use our free Image Compress tool — it processes images in your browser. How any data associated with the tool is handled is described in our privacy policy.

Big image files slow down websites, fill up storage, and bounce off email limits. The encouraging part: most images are far larger than they need to be, and you can shrink them dramatically with almost no visible change — for free. Here is how compression works and which settings to check.

Lossy vs lossless (the only theory you need)

  • Lossless compression rewrites the file more efficiently without changing a single pixel. PNG optimization and WebP-lossless do this. Savings are real but modest (often 10–30%).
  • Lossy compression throws away detail your eyes barely register. JPEG and WebP do this, and the savings are huge (often 70–90%). Compare the preview at full size: fine detail and text can show artifacts.

For photographs, lossy is the right tool. For logos, screenshots, and graphics with text, lossless keeps edges crisp.

The biggest win is resizing, not the quality slider

A phone photo can be 4000+ pixels wide. If it’ll be shown at 1600px, those extra pixels are pure weight. Resize to the dimensions you’ll actually use first, then compress — that order does most of the work. See how to resize images.

Method 1: Squoosh (free, runs in your browser)

Squoosh is a free tool from Google that compresses images right in the browser. I use it constantly:

  1. Open it and drop an image in.
  2. Pick an output format (MozJPEG or WebP for photos).
  3. Drag the quality slider and watch the live side-by-side preview and file size.
  4. Stop when the preview still preserves the detail you need — usually around 75–85% — and download.

The live preview is what makes it great: you compress by eye, so you never overdo it.

Method 2: On a Mac (Preview, offline)

For a quick offline shrink:

  1. Open the image in Preview.
  2. File → Export.
  3. Choose JPEG and drag the Quality slider down while watching the estimated size.
  4. Save.

For batches, the free ImageOptim app strips hidden metadata and re-compresses a whole folder of images by drag-and-drop, losslessly by default.

Method 3: On Windows

The built-in Photos app can resize (which is most of the saving), and Paint can re-save a photo as a JPEG. For better control and batch work, free tools like IrfanView or the same browser-based Squoosh do an excellent job without installing much.

Method 4: Command line (batch + scriptable)

For repeatable jobs, these free tools are superb:

# JPEG: optimize in place, target quality 82
jpegoptim --max=82 *.jpg

# PNG: strong lossy palette reduction (still looks great)
pngquant --quality=65-85 image.png

# Convert to WebP at quality 80
cwebp -q 80 input.png -o output.webp

pngquant reduces the colour palette, which can shrink screenshots and graphics. Check gradients and fine details for visible changes.

Where the work happens

Tools differ in where they process your images: some run in the browser (Squoosh), some are desktop apps (Preview, ImageOptim), and some send files to a server. Whichever you pick, check its privacy policy to see how any data associated with the tool is handled.

A reliable recipe

  1. Resize to the dimensions you’ll actually display.
  2. Choose the right format — JPEG/WebP for photos, PNG/WebP for graphics.
  3. Compress to ~80% quality (lossy) and check by eye.

Follow that and a 5 MB photo routinely becomes a sharp 300 KB file. If you’re optimizing images specifically to speed up a website, we go further in reduce image size to speed up your site.

Frequently asked questions

Can I really compress an image without losing any quality?

It depends what you mean. True lossless compression (like PNG optimization or WebP lossless) shrinks the file with zero pixel changes, but the savings are modest. Lossy compression (JPEG or WebP) discards detail your eye barely notices and saves far more. For photos, a high-quality lossy setting around 75–85% is visually indistinguishable from the original while being a fraction of the size.

What makes the biggest difference to image file size?

The pixel dimensions. A photo straight from a phone might be 4000 pixels wide — far more than a website or document ever shows. Resizing it down to the size it's actually displayed at (say 1600px) often cuts the file more than any compression slider. Resize first, then compress.

Should I use JPEG, PNG, or WebP?

Use JPEG or WebP for photos, PNG or WebP for graphics with sharp edges or transparency. WebP usually beats both on size. We compare them in detail in the PNG vs JPG vs WebP guide.

Is it safe to compress images online?

It depends on the tool. Some run the compression in your browser, others process on a server; how any data associated with a tool is handled is set out in that tool's privacy policy, so check it before uploading anything you care about.

Related guides

Find your next tool

37 tools

Compress image Shrink file size while keeping quality. Resize image Change width and height to any size. Crop image Trim images to the exact frame you want. Convert image Switch between JPG, PNG, WebP and more. Remove background Erase the background in one click. Image to PDF Combine images into one PDF document. Rotate & Flip Turn, straighten, and mirror photos. Image to text Pull editable text out of any image. HEIC to JPG Open iPhone HEIC photos as JPG. Watermark Stamp text or logos over your images. Collage Arrange multiple photos into a grid. Favicon Generator Build favicons in every required size. Color Picker Grab hex colors and build palettes. Blur & Pixelate Obscure faces, plates, and private bits. Enhance Auto-fix brightness, contrast, and color. Passport Photo Prepare photos for ID and passport applications. Signature Clean up and extract handwritten signatures. Photo Effects Apply filters and vintage looks. Social Image Size covers for common social platforms. Add text to image Caption images and make memes fast. GIF Maker Turn frames or clips into animated GIFs. Border & Frame Add clean borders and photo frames. Mockup Drop screenshots into device frames. SVG Converter Trace raster images into scalable SVG. EXIF Viewer Inspect camera and GPS metadata. Poster & Print Lay out posters and print-ready sheets. Document Scanner Deskew and clean photographed documents. Image to Base64 Encode images into a data-URI string. Placeholder Make dummy placeholder images on demand. Image generator Make gradients, patterns, and avatars. Compare Images See two images side by side with a slider. QR Code Create and download QR codes. Hide Text in Image Embed a secret message inside a picture. Length converter Meters, feet, inches, miles and more. Weight converter Switch between kilograms, pounds and more. Temperature converter Celsius, Fahrenheit, Kelvin and more. Data storage converter Bits, bytes, megabytes and gigabytes.
Tab to move · Enter to open · Esc to close