Image Compressor
Choose image or drag & drop
PNG, JPEG, WebP, AVIF up to 100 MB
Runs locally in your browser. Nothing is uploaded or sent to a server.
Upload your image, choose an output format (JPEG, WebP, PNG lossless, or AVIF), apply a quality preset or pick a target file size such as 100 KB or 1 MB, optionally cap the maximum width and height, review the before/after preview, then download. All processing runs in your browser - no upload, no server.
Updated
Work on images right from any web page: the free Image Tools extension compresses, converts, resizes and crops a picture with a right-click. Add to Edge · Add to Firefox
Related Tools
ZIP Extractor
Look inside. Take only what you need.
image-toolsImage to Text (OCR)
Extract text in seven languages from up to 10 images in your browser. Select a region, edit, copy, or download TXT. Free OCR with no image upload.
image-toolsImage Resizer
Set pixel dimensions, scale by percentage, or enter print sizes with DPI, then choose how the image fits.
image-toolsPNG to WebP Converter
Compare PNG and WebP, adjust quality per image, and download up to 50 conversions as a ZIP.
image-toolsAVIF to PNG Converter
Convert up to 50 AVIF files locally, preserve transparency, and download PNGs individually or as a ZIP.
image-toolsBMP to JPG Converter
Convert BMP files locally with adjustable JPEG quality, transparency backgrounds, and batch ZIP downloads.
How Does Browser-Based Image Compression Work?
Image compression reduces file size by removing redundant or imperceptible data. This tool uses the browser's native Canvas API to re-encode the image at a controlled quality level, discarding color detail that the human eye does not perceive at screen resolutions. The entire operation runs on your device's CPU - no data leaves your browser at any point.
Lossy formats use different encoding algorithms: JPEG applies Discrete Cosine Transform (DCT) to divide the image into 8x8 pixel blocks and quantizes high-frequency detail. WebP uses intra-frame prediction derived from the VP8 video codec, achieving smaller file sizes at equal visual quality. According to Google Developers documentation, WebP is 25-34% smaller than JPEG at equivalent quality. AVIF, based on the AV1 codec, achieves roughly 50% smaller files than JPEG - at the cost of longer encoding time in browser environments.
Which Quality Preset Should You Choose?
The tool provides four named presets mapped to specific quality values, each targeting a different delivery context:
- Print (90%) - Near-lossless output for assets that will be printed or inspected at full resolution. File sizes remain large by design.
- Web (80%) - The default for on-screen delivery. Reduces file size by 50-70% with no perceptible quality difference at typical viewing distances and screen densities.
- Email (70%) - Targets the attachment size limits common to mail services. Visible only on close inspection of high-detail areas.
- Micro (50%) - For thumbnails and bandwidth-constrained contexts. Block artifacts become visible in JPEG output at this level; WebP handles it more gracefully.
The contextual label under the slider updates as you drag - "Print-ready", "Web recommended", "Social media", or "Low quality" - so you always know which tier your custom value falls into without memorizing the numbers.
How Do You Hit a Specific File Size?
Target Size mode solves the problem of hard constraints: email attachment limits, platform upload ceilings, or API payload restrictions. Enter a value in KB and the tool runs a binary search over the quality axis. It starts at the midpoint, checks whether the result exceeds or falls under the target, then narrows the search range. After up to 10 iterations it converges on the highest quality that fits within 5% of your target.
The default target is 50% of the input file size - a sensible starting point that balances size reduction with quality retention. If even minimum quality cannot reach the target, the tool reports the smallest achievable size so you can adjust your limit rather than producing an unusable result.
What Does the Before/After Preview Show?
The before/after slider renders the original and compressed image on a shared canvas, split by a draggable divider. This is the most direct way to judge whether a quality setting is acceptable: compression artifacts in JPEG output appear as blockiness in high-contrast edges and gradients, while WebP artifacts manifest as subtle smearing in fine texture areas. Move the divider over any region of concern to isolate the difference.
Below the preview, the savings panel displays three numbers: the absolute reduction in KB, the percentage reduction, and an estimated 3G transfer time improvement. The 3G estimate is calculated from the size delta using a nominal 3G throughput of 1.5 Mbps - a useful proxy for real-world mobile delivery impact.
Why Does the Tool Strip EXIF Metadata by Default?
EXIF metadata embedded in JPEG and WebP files records GPS coordinates, device identifiers, timestamps, and camera settings. For personal photos taken on a smartphone, the GPS block is a direct privacy risk when sharing images publicly. The tool strips EXIF by default, which also reduces file size by a few kilobytes per image.
If you need to preserve metadata - for professional archives, copyright attribution, or workflows that depend on camera data - the EXIF toggle transfers the original EXIF block into the compressed output for JPEG. PNG output never carries EXIF, so the toggle applies only to JPEG and WebP formats.
What Is the Smart Format Default for PNG Inputs?
When you upload a PNG, the tool automatically sets the output format to WebP rather than JPEG. This prevents a common problem: re-encoding a PNG screenshot or logo to JPEG can produce a larger file, because PNG's lossless compression is extremely efficient for flat-color images with sharp edges, while JPEG's DCT algorithm introduces artifacts into those same regions without achieving meaningful size reduction.
If the compressed output is still larger than the original after format selection, the output growth warning appears in amber. This is the tool's signal to either use PNG lossless output (which preserves every pixel exactly) or accept that the source image is already near-optimally compressed. For photographic PNG inputs - scanned documents, photos saved as PNG - switching to JPEG or WebP produces the expected reduction.
How Do You Compress an Image to Under 100KB, 200KB or 1MB?
Upload forms, job portals, email and CMS fields often state a hard limit. In Target Size mode, click one of the limit chips (20 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB, 2 MB, 5 MB) or type any KB value. After compression, a status line reports either "Under 200 KB" with the exact size, or the smallest size the current settings can reach.
When the limit is out of reach, lower the maximum dimension. Quality alone has a floor: a large photo squeezed to a small file shows blocky artifacts, while the same photo scaled to a smaller size first keeps clean detail. The status line offers a one-click button that applies the next smaller dimension step.
Should You Resize or Compress First?
Both happen in a single step here. The maximum width/height control caps the longest side before the image is encoded, so you do not need a separate resizer. These caps are common starting points:
| Use case | Max dimension |
|---|---|
| Large screens and hero images | 2,560 px |
| Standard web pages and blog posts | 1,920 px |
| Email attachments | 1,280 px |
| Thumbnails, forums, chat | 800 px |
Why Does a Transparent PNG Turn Black as JPEG?
JPEG has no alpha channel. When a PNG or WebP with transparent areas is exported as JPEG, those areas need a solid fill. The tool detects transparency in your image and, for JPEG output, shows a Background control: White by default, Black, or a custom colour. For logos and screenshots that must stay transparent, pick WebP or PNG output instead.
JPEG vs WebP vs PNG: Compression Comparison
| Format | Extension | Compression | Transparency | Animation | Browser Support | Typical Size |
|---|---|---|---|---|---|---|
| JPEG | .jpg | Lossy | No | No | 100% | Baseline reference |
| WebP | .webp | Lossy & Lossless | Yes | Yes | 96%+ (all modern) | 25–35% smaller than JPEG |
| PNG | .png | Lossless | Yes | No | 100% | 2–5x larger than JPEG |
| AVIF | .avif | Lossy & Lossless | Yes | Yes | 92%+ | 50% smaller than JPEG |
How to Use Image Compressor
-
Upload your image
Click the upload area, drag and drop, or paste from clipboard (Ctrl+V / Cmd+V). PNG, JPEG, WebP, and AVIF inputs are all supported.
-
Choose output format and quality
Select JPEG, WebP, PNG (lossless), or AVIF as the output format. Pick a quality preset - Print (90), Web (80), Email (70), or Micro (50) - or drag the slider manually. The label under the slider updates to reflect the compression tier in plain language.
-
Switch to Target Size mode if needed
Toggle to Target Size mode and enter a value in KB. The tool runs a binary search across quality settings to find the highest quality that fits under your limit, defaulting to 50% of the original file size.
-
Cap the dimensions if you need a smaller file
Choose a maximum width/height (3,840, 2,560, 1,920, 1,280 or 800 px, or a custom value). The longest side is scaled down with the aspect ratio kept, and smaller images are never enlarged. The exported pixel size is shown under the savings panel.
-
Review and download your compressed image
The before/after slider lets you compare the original and compressed image side by side. The savings panel shows the size reduction in KB, as a percentage, and as an estimated 3G transfer time improvement. Click Download to save the file. If needed, edit the filename in the field above the button before saving. The original file is never modified.