No uploads. No servers. No tracking.

Compress your images
without leaving the browser.

Drop JPG, PNG, or WebP files below. Everything runs on your device — your images never touch a server.

Drop images hereTap to select images

JPG, PNG, WebP · Max 20MB each

1

Pick a max size

Use the slider or type a custom value. Default is 500 KB.

2

Drop your files

Drag images or tap to pick. Compression starts instantly. Up to 20 files.

3

Download

Grab files individually or as a ZIP. Nothing was ever uploaded.

More tools

Formats

JPG, PNG, and WebP. PNG is internally converted to WebP for effective compression.

Privacy

Zero network requests during compression. Open DevTools and verify — the Network tab stays empty.

Performance

Web Workers compress in the background. Three images process concurrently without blocking the UI.

Why compress images?

Images account for roughly half of the average web page's total weight. A single uncompressed photograph from a modern phone camera can easily exceed 5 MB — enough to add several seconds to page load times on mobile connections. Compressing images reduces file size while preserving visual quality, which directly improves page speed, user experience, and search engine rankings.

Google's Core Web Vitals, particularly Largest Contentful Paint (LCP), penalize pages that take too long to render their main visual content. Oversized hero images are one of the most common causes of poor LCP scores. Compressing a 4 MB hero image down to 200 KB can shave multiple seconds off load time and push a page from "needs improvement" into the "good" range.

Beyond web performance, smaller images save storage space, reduce cloud hosting costs, and make file sharing easier. Whether you're a photographer delivering client galleries, a designer preparing assets for a CMS, or a student submitting homework with file-size limits, compression is a practical skill that saves time and money.

Common scenarios where compression helps

  • E-commerce product images — Online stores often have hundreds of product photos. Compressing each to under 200 KB keeps category pages fast and reduces bandwidth costs.
  • Blog and editorial images — Articles with multiple photos benefit from compression to keep total page weight under 1 MB, improving readability on slow connections.
  • Email attachments — Many email providers cap attachments at 25 MB. Compressing a batch of vacation photos to 500 KB each lets you send more in a single email.
  • Social media uploads — Platforms like Instagram and Twitter re-compress images on upload, often aggressively. Pre-compressing to a reasonable size gives you more control over the final quality.
  • Portfolio and freelance work — Designers and photographers often need to send proofs or low-res previews. Compressing to a target size ensures fast delivery without sharing full-resolution originals.
  • Form submissions and applications — Government portals, university applications, and insurance claims frequently impose strict file-size limits on uploaded documents and photos.

How browser-based compression works

This tool uses the HTML5 Canvas API and Web Workers to compress images entirely on your device. When you drop an image, a Web Worker decodes it, draws it onto an off-screen canvas, and re-encodes it as a JPG or WebP at progressively lower quality levels until the file fits under your target size. Three images process concurrently for speed, while the main thread stays responsive.

Because everything runs in your browser, there are no upload queues, no file size limits imposed by a server, and no risk of your images being stored on third-party infrastructure. This makes client-side compression ideal for sensitive documents, client deliverables, or any workflow where privacy matters. Open your browser's Network tab during compression and you'll see zero outbound requests — that's the guarantee.

JPG vs PNG vs WebP: which format should you use?

Choosing the right image format is just as important as compression. Each format has distinct strengths depending on the type of image and where it will be used.

FeatureJPGPNGWebP
Best forPhotos, gradientsGraphics, transparencyBoth photos & graphics
TransparencyNoYes (alpha channel)Yes (alpha channel)
CompressionLossyLosslessLossy & lossless
File sizeSmallLargeSmallest
Browser supportUniversalUniversal97%+ (all modern)
AnimationNoNo (APNG limited)Yes

JPG (JPEG) is the default choice for photographs and images with smooth color gradients. It uses lossy compression, meaning some visual data is permanently discarded to achieve smaller file sizes. At quality settings above 70%, the loss is virtually imperceptible to the human eye. JPG does not support transparency, so it's unsuitable for logos or icons that need to sit on variable backgrounds.

PNG uses lossless compression, preserving every pixel exactly as the original. This makes it ideal for screenshots, logos, icons, and any image where sharp edges and transparency matter. The trade-off is larger file sizes — a PNG screenshot can easily be 5–10x the size of an equivalent JPG. For web use, PNG is best reserved for graphics with fewer colors, text overlays, or images that require an alpha channel.

WebP is a modern format developed by Google that supports both lossy and lossless compression, plus transparency and animation. WebP typically produces files 25–35% smaller than equivalent JPGs and significantly smaller than PNGs. With browser support now above 97% globally, WebP is an excellent default for web images. This tool internally uses WebP when compressing PNG files to achieve meaningful size reductions while preserving visual fidelity.

Image optimization best practices

Compression is one piece of a broader image optimization strategy. Following these best practices ensures your images load fast, look sharp, and don't waste bandwidth.

1. Resize before you compress

A common mistake is compressing a 4000×3000 px photo and displaying it in a 800×600 container. The browser still downloads the full file, then scales it down. Resize the image to match its display dimensions first, then compress. This alone can reduce file size by 80% or more before compression even starts.

2. Choose the right target size

There's no single "correct" file size — it depends on the use case. As a general guideline: hero images and banners should be under 200 KB, product thumbnails under 80 KB, and blog post images under 150 KB. For email attachments, aim for 200–500 KB per image. Use the slider on this tool to set your target and inspect the results visually.

3. Use modern formats where possible

WebP offers 25–35% smaller files than JPG at the same visual quality. If your platform supports it, prefer WebP. For maximum compatibility, serve WebP with a JPG fallback using the HTML <picture> element. AVIF is even more efficient but has narrower browser support.

4. Strip metadata you don't need

Camera photos include EXIF metadata: GPS coordinates, camera model, shutter speed, and more. This can add 20–100 KB per image and may expose private location data. This tool automatically strips EXIF data during compression via the Canvas API, which is both a privacy feature and a size optimization.

5. Batch process for consistency

When preparing images for a website or gallery, compress all of them in one batch with the same target size. This ensures consistent quality across the page and avoids the visual mismatch of mixing heavily compressed and uncompressed images side by side.

6. Always check the output visually

Compression is a trade-off between file size and quality. After compressing, compare the original and compressed versions at 100% zoom. Look for banding in gradients, blur around text, and artifacts near high-contrast edges. If the quality isn't acceptable, increase your target size slightly and re-compress.

Understanding lossy vs lossless compression

Image compression falls into two categories: lossy and lossless. Understanding the difference helps you choose the right approach for each image.

Lossy compression permanently discards some visual data to achieve smaller files. JPG and lossy WebP both use this approach. The algorithm analyzes the image and removes details that the human eye is least likely to notice — subtle color variations, fine texture in busy areas, and high-frequency noise. At quality levels above 70–80%, the changes are virtually invisible in normal viewing conditions. Below 50%, compression artifacts become visible: blocky patterns (especially in smooth gradients), color banding, and smeared fine details.

Lossless compression reduces file size without discarding any data. The decompressed image is bit-for-bit identical to the original. PNG and lossless WebP use this approach. Lossless compression works by finding patterns in the pixel data and encoding them more efficiently — similar to how a ZIP file works. The trade-off is that lossless files are significantly larger than lossy ones, typically 2–10x bigger for photographic images.

When to use each: Choose lossy compression for photographs, real-world images, and any content where a small quality reduction is acceptable. Choose lossless for screenshots, technical diagrams, pixel art, images with text overlays, and any image where every pixel matters. When in doubt, compress a copy and compare — if you can't see the difference, lossy is the better choice for file size.

Privacy-first image compression

Most online image compressors upload your files to a server for processing. Your images pass through third-party infrastructure, may be temporarily stored on disk, and could be retained in logs or backups. For personal photos, client work, legal documents, or medical images, this creates unnecessary risk.

CompressLocal takes a fundamentally different approach. Every step of the compression pipeline — decoding, canvas rendering, quality reduction, and re-encoding — happens inside your browser using standard Web APIs. The tool loads once as static HTML, CSS, and JavaScript. After that, your browser handles everything locally. No XMLHttpRequest, no fetch calls, no WebSocket connections.

You can verify this yourself: open your browser's Developer Tools, switch to the Network tab, and compress an image. The only requests you'll see are the initial page load. During compression, the network log stays completely silent. This isn't a marketing claim — it's an architectural guarantee.

This design also means CompressLocal works offline. Once the page is loaded, you can disconnect from the internet entirely and the tool continues to function. This makes it suitable for air-gapped environments, confidential workflows, and situations where network access is unreliable.

FAQ

Are my images safe?
Yes. Compression uses the Canvas API and Web Workers inside your browser. Nothing leaves your device. Check the Network tab in DevTools to verify — you'll see zero network requests during compression.
What happens with PNG files?
PNG is lossless, so quality-based compression doesn't work directly. PNGs are internally compressed as WebP to hit the target size, then saved with the original .png extension. This approach gives you significant size reductions while maintaining visual quality.
What if my file ends up smaller than the max size I set?
The max size is an upper limit, not an exact target. The compressor reduces quality until the file fits under that limit, so results are often well below it. If the file is already smaller than the target, it's returned as-is without any re-compression.
How many files can I compress at once?
Up to 20 images, each up to 20 MB. Three images compress concurrently using Web Workers to balance speed and memory usage. You can download them individually or as a single ZIP file.
Does it work on mobile devices?
Yes. Tap the upload area to pick images from your camera roll or file system. Compression runs in the background using Web Workers, so your phone stays responsive. The interface adapts to smaller screens automatically.
What's the difference between lossy and lossless compression?
Lossy compression (used for JPG and WebP) permanently removes some visual data to achieve smaller files. At quality levels above 70%, the difference is usually invisible. Lossless compression (PNG) preserves every pixel but produces larger files. This tool uses lossy compression to hit your target file size.
Will compression reduce my image quality?
All lossy compression involves a trade-off between file size and quality. At moderate compression levels, the quality loss is imperceptible to the human eye. If you set a very aggressive target (e.g., 50 KB for a large photo), you may notice artifacts like banding or blur. Always check the output visually and adjust your target size if needed.
Can I use this tool offline?
Yes. Once the page has loaded in your browser, you can disconnect from the internet and continue compressing images. Since all processing happens locally using Web APIs, no network connection is needed after the initial page load.
Does this tool strip EXIF data from my photos?
Yes. The Canvas API, which this tool uses for compression, automatically strips EXIF metadata including GPS coordinates, camera model, and other embedded data. This is a privacy feature — your compressed images won't contain hidden location or device information.
How is this different from TinyPNG or other online compressors?
Most online compressors upload your images to their servers for processing. CompressLocal runs entirely in your browser — your files never leave your device. This means faster processing (no upload/download wait), complete privacy, no file size limits from a server, and the ability to work offline.
What browsers are supported?
Any modern browser that supports Web Workers and the Canvas API: Chrome, Firefox, Safari, Edge, and their mobile equivalents. The tool works on Windows, macOS, Linux, iOS, and Android.
Is there a cost or signup required?
No. CompressLocal is completely free to use with no account required. There are no watermarks, no daily limits, and no premium tier. The tool is funded by non-intrusive advertising.