Image Compressor guide
Shrink photos and screenshots for email, websites, and upload forms without sending them anywhere. Set a quality level, or type a target size such as 100 KB or 1 MB and let the compressor find the best quality that fits.
How browser-based compression works
Your image is decoded by the browser, drawn onto an invisible canvas at the size you choose, and re-encoded as JPEG or WebP at the quality you set. The canvas toBlob function does the encoding with the same codecs the browser uses everywhere else. Nothing is sent to a server, so a 20 MB photo compresses as fast as your device can crunch it, even offline.
Lossy compression works by throwing away detail the eye is least likely to notice, mostly fine color variation and high-frequency texture. The quality number controls how aggressive that is. It is not a percentage of the original size; quality 75 does not mean 75% of the bytes.
Target size mode, explained
Many upload forms have hard limits: 100 KB for some government and exam portals, 200 KB or 2 MB for job applications, 25 MB for a Gmail attachment. Target size mode finds the highest quality that fits. It runs a binary search: encode at quality 52%, check the size, then try halfway up or down, repeating seven times, which pins the quality down to within about 1%.
If the file is still too large at the lowest quality tried, the tool shrinks the dimensions by 15% and searches again, up to ten rounds. The note under the results tells you the quality it settled on and whether the dimensions were reduced.
Worked example: a phone photo for a web form
A 12-megapixel iPhone photo is 4032 x 3024 pixels and roughly 3 to 5 MB as a JPEG. Set a max width of 1600 px and the image drops to 1600 x 1200, about 84% fewer pixels. At quality 75, a typical outdoor photo lands in the 200 to 400 KB range, a 90%+ reduction that still looks sharp on a laptop screen.
If a form demands under 100 KB, switch to target size, enter 100, and keep the 1600 px limit. The search typically settles somewhere around quality 30 to 50 for a detailed photo. If that looks too rough, lower the max width to 1200 px and let the quality climb back up. Fewer pixels at higher quality usually looks better than more pixels at very low quality.
JPEG or WebP?
Google's WebP compression study found WebP files 25 to 34% smaller than JPEG at equivalent quality, and WebP supports transparency, which JPEG does not. Every current version of Chrome, Safari, Firefox, and Edge displays it. For your own website, WebP is the better default.
JPEG still wins on compatibility. Some older desktop software, printing services, and form upload validators reject WebP outright. If the image is leaving the web, JPEG is the safe choice. When saving a transparent PNG as JPEG, transparent areas become white; pick WebP to keep them.
Images and page speed
Images are usually the heaviest part of a web page, and the hero image is often the Largest Contentful Paint element that Google measures in Core Web Vitals. The good threshold is LCP under 2.5 seconds. Serving a 4 MB original where a 150 KB WebP would do is the most common reason a page fails it.
A practical rule: size images to the largest width they are displayed at, times two for high-density screens. A photo shown 800 px wide in your layout needs to be 1600 px wide at most.
Common mistakes
Compressing the same JPEG repeatedly. Each lossy pass adds artifacts. Always start from the original.
Using lossy compression on screenshots with text. JPEG smears sharp edges into fuzz. For screenshots, keep quality at 85 or higher, or use a PNG optimizer.
Expecting HEIC files to open everywhere. iPhone HEIC photos only decode natively in Safari. In other browsers, convert them first or set the iPhone camera format to Most Compatible.
How we calculate: sources
Frequently asked questions
How do I compress an image to 100 KB (or any size)?
Choose the image, switch Mode to "Target file size", and enter 100. The compressor tries quality levels until it finds the highest one under 100 KB. If even low quality is too big, it reduces the dimensions 15% at a time until it fits.
What quality setting should I use?
70-80% is the sweet spot for most photos: files often shrink 50-80% with little visible difference. Go lower for thumbnails and higher for images with fine text or sharp edges, like screenshots.
Should I use JPEG or WebP?
WebP is typically 25-35% smaller than JPEG at similar quality, keeps transparency, and works in every current browser. Use JPEG when the file is going to an older system, a government or job portal, or software that rejects WebP.
Can I compress PNG files?
Yes. PNGs are re-encoded as JPEG or WebP, which is usually far smaller for photos. Choose WebP to keep transparent areas; JPEG fills them with white.
Why did my file get bigger?
Images that are already heavily compressed, or small graphics with flat colors, can grow when re-encoded. Lower the quality, or keep the original.
Does resizing or compressing matter more?
Resizing usually matters more. A 12-megapixel phone photo (4032x3024) scaled to 1600 px wide has about 84% fewer pixels, which often cuts the file size by 70-85% before quality is even touched.
Is image metadata removed?
Yes. Re-encoding through the canvas strips EXIF data such as camera model, date, and GPS location, which is good for privacy when sharing photos online.
Do my images stay on my device?
Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.