How it works
The uploaded image is drawn onto an <canvas> — resized proportionally if you set a maximum width or height — and re-exported in the chosen format using canvas.toBlob(), a built-in browser capability. For JPEG and WebP, the quality control shrinks the file at the cost of some detail loss; PNG compression is lossless, so quality control doesn't apply to it.
Choosing the right format
Use JPEG for photos, where small quality losses aren't noticeable and the compression gain is large. Use WebP for the best balance between quality and file size, with broad support across modern browsers. Use PNG when you need to preserve transparency or exact quality, such as for icons and screenshots with text.
Frequently Asked Questions
How does image compression work in the browser?
The image is drawn onto an HTML canvas and re-exported in the chosen format and quality, using the browser's own built-in capabilities. This reduces file size, especially for JPEG and WebP, where you can adjust the compression level.
Which output formats are supported?
JPEG, WebP, and PNG. JPEG and WebP let you adjust quality to shrink the file further; PNG is a lossless format, so quality control doesn't apply to it.
Is the uploaded image sent to a server?
No. All processing happens locally, using your browser's own capabilities. The image never leaves your device.
Does the tool also resize the image?
Yes, optionally. By entering a maximum width and/or height, the image is scaled down proportionally to fit that limit before being compressed. The tool never enlarges an image beyond its original size.