How to compress an image
- Drop an image on the box, click it, paste with Ctrl+V, or click Try a sample photo. It compresses at once with the default settings.
- Under Compress by, drag Quality, or choose Target file size and type a limit such as 100 KB.
- Pick an Output format (JPEG or WebP) and, if you want fewer pixels, a Max long edge.
- Compare Original and Compressed, then click Download compressed image.
How the compression works
Your browser redraws the picture on a canvas and saves it again with canvas.toBlob at the quality you chose. JPEG and WebP are lossy: a lower quality throws away fine detail the eye notices least, so the file shrinks. Lossy WebP is typically 25 to 34 percent smaller than JPEG at equal visual quality, according to Google.
Target file size mode tests qualities from 50 to 95 in a binary search and keeps the highest one that fits your limit. If quality 50 is still too big, it reduces the width and height and searches again, unless you tick Keep the pixel size. Metadata such as camera model and GPS location is not kept.
Worked example
Click Try a sample photo, a 1,200 x 800 px JPEG of 200.4 KB. At the default JPEG quality of 80 the Compressed pane reads 59.7 KB ยท 1,200 x 800 px ยท JPEG quality 80, with the badge 70% smaller (saved 140.8 KB). Now choose Target file size, type 50 and keep KB. The status reads Compressed from 200.4 KB to 49.4 KB. Quality 77 fits under 50.0 KB. Exact sizes vary slightly between browsers.
Limits and edge cases
- The result can be bigger than the original when the original was already compressed hard. The tool says so and you can keep the original.
- JPEG has no transparency, so see-through areas turn white. Choose WebP to keep them.
- PNG files are saved as JPEG or WebP, not as smaller PNGs. Animated GIFs keep only their first frame.
- Safari cannot save WebP from a canvas, so only JPEG is offered there.
- To change pixel size for many pictures, use the image resizer. To change format only, use the image format converter.
Image compressor FAQ
How do I compress an image to under 100 KB?
Choose Target file size, type 100 and keep the unit on KB. The tool finds the highest quality that fits, and if that needs a quality below 50 it also shrinks the picture so the result stays sharp.
What quality should I use to compress a JPG?
For photos, quality 75 to 85 cuts the file size a lot with little visible change. Use 90 or higher for images with fine text or sharp edges, and go below 60 only for small thumbnails.
How do I compress a PNG without losing transparency?
Choose WebP as the output format, because WebP keeps see-through areas and is usually much smaller than PNG. JPEG turns transparent areas white, and this tool does not shrink a PNG as a PNG.
Why is my compressed image bigger than the original?
The original was probably already compressed harder than your current setting, or it was a PNG with flat colors. Lower the quality, use Max long edge to reduce the pixels, or keep the original file.
Is WebP smaller than JPEG?
Usually yes. Google's tests found lossy WebP files 25 to 34 percent smaller than JPEG at the same visual quality. JPEG is still the safer choice for old email programs and print shops.
Sources: Google, WebP; MDN, canvas.toBlob. Further reading: How to Compress Images for the Web Without Losing Quality.