Free Image Compressor Online

Compress JPEG, PNG, and WebP images up to 80% smaller. Instant results, no upload to any server.

Your files never leave your device
Drop images here or click to browse

Supports JPEG, PNG, and WebP · up to 50 MB each

Settings
60%

How It Works

  1. Select or drop one or more images above.
  2. Adjust quality slider (lower = smaller file, more compression).
  3. Images are compressed in your browser · nothing is uploaded.
  4. Download compressed images individually or all at once.

Why Compress Images?

Large images slow down websites, increase bounce rates, and hurt your Google ranking. Compressing images reduces file size by 50-80% with minimal visible quality loss. This is essential for web developers, bloggers, e-commerce stores, and anyone who publishes content online. Smaller images also save bandwidth on mobile devices and improve Core Web Vitals scores.

What "image compression" actually means

Image compression covers two fundamentally different operations that share a name. Lossy compression, used by JPEG and lossy WebP, discards image data the human eye is unlikely to notice (subtle gradations in shadow detail, high-frequency noise, chroma subsampling for human-vision-tuned colour-vs-brightness ratios). The output is smaller than the input but cannot be reconstructed bit-for-bit. Lossless compression, used by PNG, GIF, TIFF-LZW, and lossless WebP, encodes the exact pixel data more compactly using algorithms like DEFLATE (LZ77 + Huffman). The output is smaller, and decompressing reproduces the original byte-for-byte. Which one is right depends on the image: photographs tolerate lossy beautifully because their content is full of texture the eye can't track at the pixel level; logos, screenshots, and graphics with sharp colour transitions demand lossless because every pixel is intentional.

Quality settings in a JPEG compressor (the slider on this tool, 10-100%) control the quantization tables applied after the DCT step. At quality 100 the tables barely round any frequency coefficients; at quality 50 they round aggressively. Higher quality means bigger files with finer detail; lower quality means smaller files with visible blocky artifacts in flat areas. The default of 60% sits in the sweet spot for web use: usually a 50-80% file-size reduction with no perceptible change on a typical screen. For print or large-display work, push to 80-90%. For thumbnails or email-friendly versions, 30-50% is fine.

For PNG, the "quality" slider doesn't apply in the usual sense because PNG is always lossless. What this tool actually does for PNG inputs is run a stronger DEFLATE pass than most authoring software (Photoshop, Affinity, Sketch) bothers with by default; that typically squeezes 5-25% off the file size with zero pixel change. The Format dropdown also lets you convert PNG to JPEG or WebP, which trades lossless for a much smaller file but loses transparency for JPEG output and (for photographic content) the lossless guarantee for WebP. The Max Width option resizes images during compression: a 4000-pixel-wide photo downsized to 1920 pixels saves 75% on raw pixel count before any compression even runs, so it stacks with the quality reduction.

How this tool works under the hood

The compression engine is browser-image-compression by Donald Wong (GitHub: Donaldcwl/browser-image-compression, MIT licence). It's a pure-JavaScript library, about 95 KB minified, that wraps three browser primitives: the File API for reading bytes, the Canvas API (or OffscreenCanvas when available) for decoding, resizing, and re-encoding JPEG/WebP images, and UZIP (a small DEFLATE library) for handling PNG without going through Canvas. When you drop an image, the browser hands the bytes to the library; the library chooses the path based on the input format and the requested output.

For JPEG and WebP inputs, the path is decode-to-canvas, optionally resize to the configured Max Width, then call canvas.toBlob(mimeType, quality/100). The browser's built-in JPEG or WebP encoder does the actual quantization and Huffman coding. Quality is your slider value divided by 100, passed as the second argument. For PNG inputs being kept as PNG, the library skips Canvas entirely (a Canvas round-trip would needlessly re-rasterize the lossless data) and instead runs UZIP over the IDAT chunks of the PNG file directly, with maximum compression effort. This is why PNG-to-PNG compression here is genuinely lossless: the pixel data never gets decoded and re-encoded, only the DEFLATE wrapping is tightened.

When OffscreenCanvas is supported (modern Chrome, Edge, Safari, Firefox), the heavy decode-resize-encode work runs inside a Web Worker, keeping the main UI thread responsive. You can drop a batch of 20 photos and continue to scroll the page while each one processes. On older browsers, the library falls back to the main thread, which still works but blocks the page during large jobs. The entire pipeline runs inside your tab. The library is loaded once from a CDN (about 95 KB minified) on first visit, cached afterwards. No file content ever leaves the browser. Open the Network tab in DevTools while you compress a batch and you will see the one-time library fetch but nothing else.

A brief history of image-compression formats

Supported Formats

Real-world compression workflows

Common pitfalls and what they mean

Privacy: images stay on your device

Every cloud image compressor (TinyPNG, Compressor.io, Optimizilla, Smallpdf's image tools, Pixlr's compress endpoint, the dozens of "compress image online" services) uploads your file to the operator's servers, runs their compression algorithm, and returns the smaller image as a download. The privacy implications are non-trivial because photos routinely contain identifiable content: faces, addresses visible in backgrounds, screenshots of internal UIs or confidential documents, photos of children, photos taken in private spaces. Most operators publish privacy policies committing to delete uploads within an hour or two and to encrypt in transit, and the bigger ones (TinyPNG, Smallpdf) hold ISO/IEC 27001 certification. They have strong commercial reasons to honour those policies. But "deleted within an hour" is not "never seen." During that hour the image content sits in the operator's infrastructure, accessible to any process or person with appropriate access, and visible in logs and backups according to whatever retention policy applies.

This compressor never uploads anything. The browser-image-compression library runs entirely in your tab; image bytes are read by the File API, processed in JavaScript (or in a Web Worker if OffscreenCanvas is available), and the compressed output is returned to the same tab as a downloadable Blob. You can verify there's no upload by opening the browser developer tools to the Network tab before compressing a batch: no requests fire that include your image content. The only network traffic is the one-time library fetch (~95 KB) from the CDN on first visit, after which the library is cached. Switch the browser to airplane mode after the page loads and the compressor continues to work on local files. For photos with anything sensitive (faces, locations, internal screenshots), the browser-side trade is clearly worth making.

When another tool is the right choice

Frequently Asked Questions

Does compression reduce image quality?

At the default 60% quality, most images look nearly identical to the original while being 50-80% smaller. Adjust the slider to find the right balance for your needs.

Is there a file size limit?

Each image can be up to 50 MB. Since processing happens in your browser, very large files may take a moment depending on your device.

Are my images uploaded to a server?

No. All compression happens locally in your browser. Your images never leave your device, making this completely private and secure.

What quality setting should I use?

For web use, 60-70% is ideal. For print or portfolios, try 80-90%. For maximum compression (thumbnails, email), 30-50% works well.

More frequently asked questions

Why is my PNG output only a little smaller than the original?

PNG is lossless. The savings come entirely from finding a tighter DEFLATE compression of the same pixel data, which typically saves 5-25% over what an authoring tool (Photoshop, Sketch, Figma) wrote by default. If your PNG was already well-optimized, there's not much room left. To get meaningful additional reduction, either convert to WebP (which keeps transparency and is typically 25% smaller than PNG) or accept some loss by converting to JPEG (which can be much smaller but drops transparency).

Does this tool work offline?

After the first visit, yes. The browser-image-compression library (about 95 KB minified) is cached by the browser on first load. Subsequent visits to the compressor work entirely offline, as long as the browser cache has not been cleared in the meantime. You can verify by enabling airplane mode after opening the page once and compressing a local image.

Will my EXIF data (camera, GPS, capture date) be preserved?

No, EXIF metadata is stripped during compression by default. For web sharing this is usually desirable (GPS coordinates and camera serial numbers shouldn't leak), but for photographers archiving with metadata intact this tool isn't right. Use a desktop EXIF-aware compressor like ImageOptim (macOS) or jpegtran with the `-copy all` option to preserve metadata.

What's the difference between Max Width resize and quality reduction?

Resizing changes the pixel dimensions of the image: a 4000x3000 photo resized to 1920x1440 has 75% fewer pixels to encode, which cuts file size before any compression even runs. Quality reduction (the slider) controls how aggressively the JPEG or WebP encoder rounds its DCT coefficients, which makes the encoded data smaller per pixel. The two stack: resize first to drop overall pixel count, then quality-reduce what remains. For a typical "make this web-friendly" workflow, set max width 1920, quality 70, and the output is roughly 10-15% of the original size.

Can I compress HEIC images from my iPhone?

Browser support for decoding HEIC is limited (Safari on Apple devices does it; Chrome and Firefox don't). On non-Apple browsers this tool will reject HEIC files. The workflow for iPhone photos is to either change the iPhone setting (Camera → Formats → Most Compatible) to save JPEGs directly, or convert HEIC to JPEG once on a Mac or with a dedicated tool, then run those JPEGs through this compressor. iCloud's "Share via" sheet typically converts to JPEG automatically when sharing to non-Apple recipients.

Is there a desktop or command-line equivalent?

Several. For batch automation, sharp in Node.js is the standard server-side library and produces near-identical output. ImageMagick (magick input.jpg -quality 70 output.jpg) and GraphicsMagick handle huge files and run from any shell. jpegoptim and optipng are specialized JPEG and PNG re-encoders that often squeeze a few extra percent versus generic tools. For one-off interactive work like this tool but with more controls, Squoosh (Google Chrome Labs, also entirely client-side) supports a wider range of formats including AVIF.

Related Tools