Image Compressor
Image Tools · Added
Reduce image file size locally with a quality slider and an immediate before-and-after comparison. Your files are read straight from the disk into the page — they are never uploaded, so a passport scan or an unreleased product shot is as safe here as a holiday photo.
How to use the image compressor
- 1Choose one or more images, or drop them onto the box. JPG, PNG, WebP, GIF, BMP and AVIF are accepted.
- 2Pick an output format. "Keep original" re-encodes JPEG and WebP in place; GIF and BMP become PNG, because the canvas has no encoder for them.
- 3Drag the quality slider. Every change re-encodes automatically and the before-and-after sizes update with it.
- 4Optionally cap the longest side in pixels. On photos straight from a phone this usually saves more than the quality slider does.
- 5Check the preview, then download each image. The file is written straight to your downloads folder.
Examples
A phone photo for a web page
- Input
- 4032×3024 JPEG, 4.1 MB · quality 75% · longest side capped at 1600 px
- Result
- 1600×1200 JPEG, about 210 KB — roughly 95% smaller
Most of that saving is the resize, not the quality setting. A 4032 px wide photo is about six times wider than the space it will occupy on a page.
A PNG screenshot that will not shrink
- Input
- 1920×1080 PNG screenshot, 480 KB · format "Keep original"
- Result
- 1920×1080 PNG, about 470 KB — almost no change
PNG is lossless, so the quality slider does nothing to it. Switching the output to WebP at 80% typically brings the same screenshot under 90 KB with no visible difference.
A logo with a transparent background, saved as JPEG
- Input
- PNG with transparency · output JPEG · background #FFFFFF
- Result
- JPEG with the transparent area filled white
JPEG has no alpha channel. Without the fill those pixels would come out black, which is why the background colour appears as soon as you pick JPEG.
About the image compressor
What actually makes an image file large
Three things decide the size of an image file: how many pixels it contains, how much detail those pixels hold, and how aggressively the format is allowed to throw detail away. Most oversized images on the web are oversized because of the first, not the third. A modern phone photographs at around 4000 pixels wide; a full-width image on a typical page is displayed at roughly 1200. Everything beyond that is downloaded, decoded and then discarded by the browser at draw time.
That is why this tool offers a size limit alongside the quality slider, and why the limit usually wins. Halving both dimensions removes three quarters of the pixels before the encoder is even involved. Quality settings work on what is left. Reaching for quality alone, and dragging it low enough to hit a size target, produces a visibly degraded image at dimensions that were never needed.
Lossy and lossless, and when each is the right choice
JPEG and WebP are lossy: they discard information the eye is poor at noticing, mainly fine colour variation, and they can be tuned by how much they discard. PNG is lossless — it compresses by describing repetition rather than by removing anything, so it always reproduces the original exactly, and a quality control would be meaningless for it.
The practical rule follows from what is in the picture. Photographs, with continuous gradients and no hard edges, compress extremely well in a lossy format and poorly in a lossless one. Screenshots, diagrams, logos and anything with text or large flat areas are the reverse: PNG handles them efficiently, while JPEG smears artefacts around every sharp edge. WebP is the one format that is good at both, which is why it is often the right answer for a screenshot that has to be small.
One caveat about repeated compression. Each lossy re-encode discards detail from what the previous one already discarded, and the damage accumulates in a way that no later step can undo. Compressing a compressed file — the usual cause of a photo that has gone blotchy after passing through several apps — is best avoided by always working from the original.
Why this runs in your browser
Every step here happens inside the page: the file is read with the browser's own file API, drawn onto an off-screen canvas, and re-encoded by the same engine the browser uses to display images. Nothing is sent anywhere, which is a meaningful difference for the images people most often need to shrink — a scanned passport for a visa form, a photograph of a signed contract, a medical letter, a product shot before launch.
There is a practical trade-off in that choice, and it is worth stating rather than glossing over. A server-side tool can run specialised encoders such as MozJPEG or a full PNG optimiser, and squeeze out somewhat more at the same visual quality than a browser canvas will. What you get in exchange is that the file never leaves your machine, the tool works offline, and there is no queue, no upload wait and no copy of your image sitting in someone else's temporary directory.
Frequently asked questions
Are my images uploaded anywhere?
Why did my PNG barely get smaller?
Why is my compressed file bigger than the original?
Does compressing an image reduce its quality?
Does this remove EXIF data such as GPS coordinates?
Is there a limit on file size or how many images at once?
Related tools
Image Resizer
Image Tools
Resize images by pixels or percentage, with the aspect ratio locked by default.
Data Storage Converter
Converters
Convert bytes, KB, MB, GB and TB — with binary and decimal units kept separate.
Base64 Encoder / Decoder
Developer Tools
Encode text to Base64 and decode it back, with full Unicode and URL-safe support.