Image Compressor
Compress images locally in your browser using HTML5 Canvas with quality slider, WebP/JPEG output, and before/after KB savings.
About this tool
Your selected image draws onto an offscreen HTML5 Canvas at its native dimensions and exports via canvas.toBlob(callback, format, quality), calculating exact byte savings without server uploads. Shrink hero and blog images to WebP for faster LCP.
How to use the image compressor
- Press Choose image and select a JPEG, PNG or WebP picture from your device.
- Choose the output format: JPEG, WebP or PNG.
- Move the quality slider. Lower quality makes a smaller file, and higher quality keeps more detail.
- Compare the original and compressed previews, then press Download to save the smaller file.
What compression does
Image compression reduces the amount of data needed to store a picture. Lossy formats such as JPEG and WebP throw away detail the eye is least likely to notice, and the quality setting controls how much is discarded. Lossless PNG keeps every pixel, so the saving is smaller, but the file can still shrink when the picture has large flat areas.
Smaller files load faster on a web page, use less data on a phone and fit upload limits more easily. The best quality setting depends on the picture: photographs often look fine at 70 to 80 per cent, while text and diagrams need higher quality to stay sharp.
A worked example
A 4 megabyte photograph saved as JPEG at 75 per cent quality often falls to a few hundred kilobytes with little visible change. Saving the same picture as WebP at the same setting usually gives a smaller file still. Compare the two previews side by side before you choose.
- Shrink a photo for an email attachment that has a size limit.
- Prepare product photos for a shop page where speed matters.
Who uses an image compressor
- Website owners making pages load faster.
- Shop owners preparing product images.
- People sending photos by email or messaging apps with size limits.
- Bloggers and newsletter writers keeping their pages light.
- Anyone who needs a smaller copy of a picture.
Tips and common mistakes
- Compressing a file again loses more quality each time. Keep the original and compress that.
- Text in a screenshot needs a higher quality setting, or the letters will look smudged.
- PNG is not always smaller than JPEG. Use PNG for logos and transparent images, and JPEG or WebP for photos.
- Check the picture at the size it will be shown, not only at full size.
- Compression runs in your browser, so the photo never leaves your device.
Frequently asked questions
Related browser tools
Aspect Ratio Calculator
Calculate simplified aspect ratios via GCD, scale pixel dimensions proportionally, and copy CSS aspect-ratio rules in your browser.
Box Shadow Generator
Design soft CSS box shadows visually with X/Y offset, blur, spread, opacity, and inset controls locally in your browser.
Color Converter
Convert colors between HEX, RGB, HSL, and CSS OKLCH with a live swatch preview and RGB sliders locally in your browser.