Image Compressor & Format Converter
A tool for converting image files to JPEG, PNG, or WebP while adjusting quality (compression) and resizing. The Canvas API lets you preview and estimate the compressed size in real time, right in your browser — nothing is ever uploaded to a server.
Drag and drop an image, or click to select one
Supports PNG / JPEG / WebP / GIF / BMP / AVIF
How to use
- Drag and drop an image file, or click to select one (PNG, JPEG, WebP, GIF, BMP, and AVIF are supported).
- Choose an output format (JPEG, PNG, or WebP) and adjust the quality (compression) slider. When PNG is selected, the quality slider is disabled since PNG is lossless.
- To resize, adjust the width and height sliders or number inputs. With "Keep aspect ratio" on, changing one dimension automatically updates the other.
- Check the original size, estimated compressed size, reduction rate, and preview, then click "Download compressed image" to save the file.
About this tool
This tool converts image files to JPEG, PNG, or WebP, letting you compress them while adjusting quality and size. It's useful for shrinking images for a website or converting between formats.
It uses the Canvas API's `toBlob` to asynchronously regenerate the compressed result every time you change the format, quality, or resize settings, so you can compare it against the original size and see the reduction rate in real time.
If your browser doesn't support encoding to the selected output format (such as WebP output on some Safari/WebKit browsers), a warning is shown, and the file extension on download is automatically adjusted to match the format actually produced.
Frequently asked questions
Why do I get a PNG-sized file even though I chose WebP?
Some browsers (mainly WebKit-based ones like Safari) don't support Canvas-based WebP conversion, so by spec they automatically fall back to lossless PNG output. In that case, a warning is shown saying your browser isn't supported and the actual output format used. Supported browsers like Chrome compress correctly to WebP.
Why can't I move the quality slider when PNG is selected?
Because PNG is lossless compression, there's no concept of quality/compression level, so moving the slider wouldn't change the file size. Use the resize feature instead if you want a smaller file.
Can I resize the image without keeping the aspect ratio?
Yes, unchecking "Keep aspect ratio" lets you set width and height independently, so you can intentionally stretch or squash the image.
Are images uploaded to a server?
No. Loading, compressing, and generating previews all happen in your browser via the Canvas API.