Image Compressor
Shrink JPEG, PNG and WebP images in your browser – with a quality slider, optional resizing and WebP conversion. Fully local, no uploads.
Drop images here or select files
JPEG, PNG or WebP – everything is processed entirely in your browser.
Free version: one image per run. Additional images require Pro.
Compression settings
Higher quality means larger files. 0.8 is a sensible default.
Upper bound on file size per image. Leave empty to control quality only.
Images larger than this are scaled down proportionally. Leave empty to keep original dimensions.
Batch processing is a Pro feature
The free version compresses one image at a time. With docutools Pro you can compress any number of images at once and download them bundled as a single ZIP archive.
What is image compression?
Image compression reduces the file size of an image by removing redundant data or by encoding it more efficiently. Smaller image files load faster, use less storage and save bandwidth – essential for fast websites, responsive apps and lightweight email attachments. For web performance, images consistently account for 50–70% of a page's total byte weight, making compression one of the highest-return optimisations available.
There are two fundamentally different approaches. Lossy compression – used by JPEG and the lossy mode of WebP – permanently discards image data that the human visual system is unlikely to notice, using techniques such as chroma subsampling and discrete cosine transform (DCT) quantisation. The savings are dramatic: a 5 MB JPEG photograph can shrink to under 500 KB at quality 0.8 with barely perceptible loss. Lossless compression – used by PNG and WebP lossless – encodes pixel data more efficiently using algorithms like DEFLATE or LZ77, preserving every pixel exactly; the savings are typically 20–50% smaller than lossy equivalents.
The right approach depends entirely on image content. Photos and natural-scene images contain gradual tonal transitions that lossy compression handles exceptionally well – quality settings of 75–85 are normally visually indistinguishable from the original for on-screen use. Flat graphics, logos, screenshots, diagrams and any image containing text benefit instead from lossless formats because their sharp edges and uniform areas make compression artefacts highly visible. PNG's transparency (alpha channel) support makes it the correct choice for graphics placed over coloured backgrounds.
This tool runs 100% in your browser. Your images are never uploaded to a server – all processing happens locally on your device through the HTML5 Canvas API. That means there is no GDPR concern about personal photographs or confidential documents crossing a network boundary, no rate limits, and no waiting for an upload to complete. Sensitive material – medical scans, ID documents, product prototypes – never leaves your machine. This is a meaningful architectural choice, not a marketing claim: there is simply no server-side component to send data to.
Modern browsers provide everything needed for efficient image compression without plugins. The tool uses the browser-image-compression library, which iteratively adjusts quality and resolution to hit a target file size or quality level, all within the browser sandbox. Optionally it offloads the computation to a Web Worker – a separate background thread – so the user interface stays fully responsive while large images or batches are processed. WebP output is supported in all modern browsers and typically saves an additional 25–35% compared with JPEG at equivalent visual quality, while also supporting an alpha channel.
How to use the image compressor
Go from a large original to an optimised file in a few steps — no software installation, no account required:
- Add images — Drag one or more images into the drop zone or click "Select images". JPEG, PNG and WebP are supported up to 50 MB per file. All reading and decoding happens locally; nothing is sent anywhere at this step or any other.
- Set the quality — Use the slider to choose the quality factor (0.0–1.0). For photographs destined for the web, 0.7 to 0.8 delivers excellent visual quality at roughly 60–80% smaller file sizes than the uncompressed original. For print-ready images or product photos requiring critical colour fidelity, 0.85–0.92 is a safer choice.
- Resize if needed — Optionally enter a maximum edge length. The tool scales the longer dimension down to this value while preserving the aspect ratio exactly. A common web target is 1920 px (Full HD), which suits most hero images and blog photos. For thumbnails or inline images, 800–1200 px is usually sufficient. Leave the field empty to keep the original pixel dimensions.
- Pick the output format — Keep the original format or convert to WebP, which typically produces files 25–35% smaller than JPEG at equivalent quality and supports transparency. Converting an existing PNG logo to WebP lossless often halves the file size with zero quality loss. JPEG conversion makes sense when maximum compatibility with very old clients is required.
- Compress and download — Run the compression, compare the before/after sizes and dimensions shown in the results table, and download each image individually – or, with Pro, all of them as a single ZIP archive. The savings percentage is calculated against the original file, so you can immediately see whether the trade-off is worthwhile.
Tip: try quality 0.8 with WebP conversion first — for most photographs this single step produces the largest file-size reduction. Adjust the slider if the result is either too large or visually degraded.
How it works
As soon as you select an image, the tool decodes it into an HTMLImageElement and draws it onto a hidden HTML5 Canvas. If a maximum edge length is configured, the canvas is sized to the target dimensions before drawing, effectively resizing the image in the same pass. The browser's Canvas API then re-encodes the drawn pixels to the chosen format (JPEG, PNG or WebP) at the specified quality factor using toBlob() or toDataURL(). The quality parameter maps directly to the quantisation table intensity for JPEG and WebP: at 1.0 the encoder uses maximum fidelity tables; at 0.5 it applies aggressive quantisation that visibly blurs fine detail. EXIF metadata – GPS coordinates, camera model, shooting parameters – is stripped during this Canvas re-encode, which is an additional privacy benefit when sharing compressed images.
Under the hood the browser-image-compression library coordinates the process. It iteratively adjusts quality and intermediate size until the image file drops below a specified maximum size target or the desired quality level is reached, without exceeding the maximum dimensions. The iteration typically converges in two to four passes. With the Web Worker option enabled, each image is handed off to a background thread using the standard Worker API; the main thread remains free to handle UI interactions, so the page feels responsive even when processing a 20 MB raw photo. Worker communication uses structured cloning (transferable ArrayBuffers) for near-zero copy overhead.
Because every step relies exclusively on browser APIs, not a single byte of your image ever leaves your device. There is no server, no processing queue, no upload timeout and no file-size cap imposed by a network layer. The result is produced as a Blob URL in memory and offered through a dynamically created anchor tag. Once you close the tab, the Blob is garbage-collected. For batch downloads (Pro), JSZip assembles the compressed files into a ZIP archive entirely in memory before triggering the single download.
Common use cases
Faster websites and better Core Web Vitals
Images are typically the largest Largest Contentful Paint (LCP) candidate on a page. Compressing hero images, product photos and blog graphics to WebP at quality 0.8 and a 1920 px maximum often reduces total page weight by 60–70%, which directly improves LCP scores and lowers bounce rates — a measurable SEO and conversion benefit.
Email attachments
Many corporate mail servers enforce a 10–25 MB per-message limit, and mobile mailboxes fill up quickly. Compressing a handful of smartphone photos from 4 MB each to under 400 KB each makes the difference between a refused and a delivered message, without any visible degradation to the recipient.
Online forms and government portals
Application portals, HR systems and government platforms frequently enforce strict upload limits of 1–5 MB for ID photos, scanned documents and certificates. Using the compressor, a 6 MB scan can be brought well under the threshold in seconds — without involving a third-party cloud service that might store your document.
Save storage space on drives and cloud
A folder of 500 smartphone photos at 4 MB each occupies 2 GB. Batch-compressing them to WebP at quality 0.82 and 1920 px typically reduces the archive to under 200 MB — a 90% saving — while the images remain indistinguishable from the originals at normal viewing sizes. This is equally relevant for cloud storage tiers where space is billed per GB.
Example
A typical smartphone photo in JPEG format, compressed at quality 0.8 and a maximum edge length of 1920 px:
Original: photo.jpg 4.80 MB 4032 × 3024 px Settings: quality 0.8 · max 1920 px · WebP Result: photo.webp 0.42 MB 1920 × 1440 px Savings: -91% (4.38 MB smaller)
Values are illustrative and depend on the image content. Detailed photos tend to save less than uniform areas.
Tips & limitations
Tips
- For web photos, WebP is almost always the best choice – smaller than JPEG at comparable quality and with transparency support.
- Scale images to the size they will actually be displayed at. A 4000 px wide image inside an 800 px container is pure waste.
- At quality 0.75–0.85 the difference from the original is usually imperceptible while the file becomes significantly smaller.
- Enable the Web Worker when processing large images or whole batches – the interface then stays smooth and usable.
Limitations
- Lossy compression cannot be undone. Always keep a copy of the original.
- PNG graphics with large solid-color areas often shrink better by converting to WebP than by PNG-only optimization.
- Very large images or large batches are limited by your device's memory, since everything is processed locally.
- Image formats such as HEIC, AVIF, GIF or TIFF are not supported here – the tool targets JPEG, PNG and WebP.
Frequently asked questions
Are my images uploaded anywhere?
No. All compression runs directly in your browser through the Canvas API. Your images never leave your device and are not sent to any server.
What is the difference between lossy and lossless compression?
Lossy compression permanently discards image data to achieve very small files – ideal for photos. Lossless compression preserves every pixel exactly but saves less space – useful for graphics, logos and screenshots.
What quality level should I choose?
For most photos, values between 0.7 and 0.85 offer a good balance of small file size and barely visible quality loss. For graphics with sharp edges or text, a higher value or a lossless format is recommended.
Should I convert my images to WebP?
For images on websites, usually yes: WebP produces noticeably smaller files than JPEG or PNG at comparable quality and supports transparency. All modern browsers display WebP. For maximum compatibility with very old systems, JPEG can still make sense.
Does compression also reduce the image dimensions?
Only if you specify a maximum edge length. Without it, width and height stay unchanged and only the file size is reduced. With a limit set, oversized images are scaled down proportionally.
How many images can I compress at once?
The free version compresses one image per run. With docutools Pro you can process any number of images as a batch and download them bundled as a single ZIP archive.
Is there a maximum file size?
There is no upload limit because nothing is uploaded. The only constraint is your device's memory. Very large files (over 50 MB) are rejected for stability reasons.
Why is my compressed file sometimes larger than the original?
This happens when the original is already heavily optimized, or when an already-compressed JPEG is converted to another format at high quality. In such cases the tool flags the size increase so you can keep the original.
Is the transparency of PNG images preserved?
Yes, as long as you choose PNG or WebP as the output format – both support an alpha channel. If you convert a transparent image to JPEG, transparency is lost because JPEG has no transparency support.
What does the Web Worker option do?
A Web Worker runs the CPU-intensive compression on a separate thread. This keeps the user interface responsive even while large images or whole batches are being processed. We recommend leaving this option enabled.
Does the tool remove EXIF data such as GPS coordinates?
Yes, as a side effect of the Canvas API re-encode. When the browser draws your image onto a canvas and exports it, the original EXIF block — which may contain GPS coordinates, camera model, date and other metadata — is stripped from the output. This is an additional privacy benefit, especially relevant when compressing photos before sharing them publicly.
What quality setting should I use for product photos in an online shop?
For e-commerce product images displayed at typical sizes of 800–1200 px, quality 0.82–0.88 with WebP format is a good default. This range preserves colour accuracy and fine texture detail that shoppers scrutinise, while still reducing file sizes by 60–75% compared with uncompressed originals. For zoom-in views where pixel-level sharpness matters, use 0.90–0.92.
Can I use this tool to prepare images for social media?
Yes. Each platform re-compresses images you upload — knowing the target dimensions in advance lets you reduce file size yourself first, retaining more control over quality. Instagram recommends 1080 × 1080 px square or 1080 × 1350 px portrait at JPEG; Facebook covers perform best at 820 × 312 px. Set the maximum edge length to match the platform's recommended dimensions and compress to quality 0.85 before uploading.
Why does PNG compression produce less dramatic savings than JPEG?
PNG uses lossless compression (DEFLATE/LZ77), which can only remove structural redundancy — repeated patterns, runs of identical colour. A photograph's pixel data has very little such redundancy, so lossless compression saves only 10–30%. JPEG and WebP lossy modes, by contrast, can discard imperceptible high-frequency detail, achieving savings of 70–90% on the same photograph. For photos, always prefer WebP or JPEG over PNG.
Is there a way to see the visual difference before downloading?
The results table shows the exact before and after file sizes and dimensions so you can judge the trade-off numerically. For a visual side-by-side comparison, download the result and open both files in your browser's image viewer or any image editing application. Because compression is fast and local, you can try multiple quality settings within seconds to find the optimal balance.