What Is Image Compression?
Image compression reduces the file size of an image by removing redundant data. There are two types:
- Lossy compression (JPEG, WebP, AVIF) discards some visual information the human eye is unlikely to notice. File sizes often drop 60–80%.
- Lossless compression (PNG) reorganizes data without discarding pixels. File sizes drop less, and every pixel stays identical.
Smaller images load faster, improve Core Web Vitals, and cost less to serve — especially on mobile connections.
Supported Formats
| Format | Type | Best For |
|---|---|---|
| WebP | Lossy, keeps transparency | Default for the web. Broad support and a strong size-to-quality ratio |
| AVIF | Lossy, keeps transparency | Smallest files. Encoding is slower |
| JPEG | Lossy, no transparency | Photographs that need the widest compatibility |
| PNG | Lossless | Screenshots, logos, and images that must stay pixel-perfect |
WebP is the default. AVIF is usually smaller again at the same visual quality, at the cost of more encoding time. JPEG flattens transparency onto a background color you choose.
How to Use This Tool
- Upload images — drag files or a folder onto the page, paste an image, choose files, or choose a folder.
- Pick an output format — WebP, AVIF, JPEG, or PNG.
- Set quality — 1–100 for WebP, AVIF, and JPEG. PNG ignores this because it stays lossless.
- Set effort — Fast, Balanced, or Best. Higher effort spends more time for a smaller file.
- Optional: max file size — enter a KB limit for WebP, AVIF, or JPEG. The tool lowers quality until the file fits, without going above the quality you set. PNG ignores this.
- Optional: max width and height — both limits apply together, and the aspect ratio stays intact. Leave a field blank for no limit on that side. Blank does not resize the image.
- Compress — click "Compress all". Changing any setting after that enables "Recompress". Cancel stops the batch.
- Compare and download — open Compare on a result, download one file, or download every result as a ZIP. Folder paths are kept in the ZIP, and identical names get a suffix.
If a same-format result is larger than the original and you did not resize, the original file is kept. Uncheck that option if you always want the new encode.
Best Practices
Choosing the Right Format
- Use WebP as the default for pages and product images.
- Use AVIF when the smallest file matters and you can wait for encoding.
- Use JPEG for email, older systems, or photos with no transparency.
- Use PNG for screenshots, logos, and UI where pixels must not change.
Quality and Effort
- 80 is a strong default for WebP and JPEG.
- 60–70 suits thumbnails and decorative images.
- 90+ suits hero images and product photography.
- Below 50, artifacts show up on most photos.
- Balanced effort is the right default. Use Best for final assets and Fast for a large batch preview.
Resizing
A 4000px photo displayed at 800px wastes bandwidth. Set the max width and height to the largest size you actually display. A portrait image is limited by max height even when max width is larger, and the other way around.
Frequently Asked Questions
Is my data safe?
Yes. Compression runs in your browser. Images are not uploaded.
What happens to metadata?
Location data and other metadata are removed. Orientation is read first, so photos stay upright.
What is the maximum file size?
There is no upload cap. Very large images resize in the browser’s canvas instead of the slower high-quality resizer, so a huge panorama still finishes. Encoding runs one image at a time so the page stays responsive. Cancel if you want to stop.
Can I compress SVG or HEIC files?
SVG is a vector format, so this tool rejects it instead of rasterizing it. HEIC works only in browsers that can decode it, such as Safari. In other browsers, export JPEG or PNG first.
Why did my file get larger?
PNG is lossless, so a JPEG converted to PNG often grows. An already-optimized file can also grow when it is encoded again. When the format stays the same and you did not resize, the tool keeps the original if the new file is larger.
Do animations survive?
Animated GIF, animated WebP, APNG, and animated AVIF export as the first frame. The file row says so. If the original is kept because the new file was larger, the animation stays in that original.
Does WebP or AVIF support transparency?
Yes. Both keep an alpha channel. JPEG does not — transparent pixels are filled with the background color.
About This Tool
Encoding uses MozJPEG, libwebp, libavif, and OxiPNG, the same codecs Squoosh uses, running locally in a worker. Resize uses a Lanczos filter unless the image is extremely large. Nothing is uploaded.
Updated by Luis Gonzalez · Jan 21, 2026