Image Compressor
Compress a JPG, PNG or WebP by quality — or straight to a target size in KB
Drop an image here
or click to pick a file — PNG, JPG or WebP
Nothing is uploaded. The file is read and re-encoded inside your browser.
How this works
- Add an image.
- Pick Quality to set the compression level yourself, or Target size to name a file size and let the tool find it.
- Press Compress, compare the two previews, then download.
Everything runs on the Canvas API in your browser — no upload, no account.
Before you start with Image Compressor
Compress a JPG, PNG, or WebP image by quality or target file size in KB while keeping the source on your device.
Best for
- Reducing a JPG, PNG, or WebP without uploading the source
- Finding the highest quality that fits a target size in KB
- Comparing the actual output size and dimensions before downloading
Know before you start
- JPG and WebP compression can discard detail permanently
- PNG only becomes smaller through dimension reduction or a different output format
- If the target is extremely small, the tool may return the closest achievable result
Continue the workflow
How to use it
1. Add an image
Drag a PNG, JPG or WebP onto the drop area, or click to pick one. The file is decoded by your browser and never leaves your device — there is no server to send it to. The panel shows the original size, dimensions and format so you have a baseline to compare against.
2a. Quality mode
Choose an output format and move the quality slider, then press Compress. The encode only runs when you press the button, so dragging the slider stays responsive on large photos. WebP is the default for PNG and WebP sources because it compresses well and keeps transparency; JPG is the default for JPG sources. Choosing "Keep PNG" swaps the quality slider for a scale slider, because PNG is lossless and only gets smaller when it gets smaller in pixels.
2b. Target size mode
Type a size in kilobytes, or take one of the presets — 100 KB, 200 KB, 500 KB or 1 MB — pick WebP or JPG, and press Compress. The tool reports the quality, dimensions and number of encode passes it landed on.
3. Compare and download
The preview shows the original and the compressed version side by side, and you can switch to either one full width to look closely. The summary line reads like "2.4 MB → 96 KB, 96% smaller, 1920×1080 → 1600×900, quality 74". Download saves a single file named after the original, for example photo-compressed.webp.
How target size works
Quality comes first. At the original dimensions, the tool binary-searches the quality range from 10 to 95 — encoding the image, checking the resulting byte count, and narrowing the range — until it finds the highest quality that still fits under your target. That usually takes six or seven encode passes and no pixels are lost.
Dimensions are the fallback, not the first move. If even quality 10 is still over the target, the image is scaled down and the quality search runs again at the new size. The step is estimated from how far over target the smallest attempt was, but is clamped so a round never shrinks the width by more than half or by less than 10%. The floor is 320px wide: if the target still cannot be met there, the tool stops, hands you the closest result it produced, and says so rather than pretending it succeeded.
Because the search only ever measures real encoded output, the reported size is the actual file size you will download — not an estimate.
Questions
Is my image uploaded to a server?
No. The file is decoded and re-encoded by the Canvas API inside your browser. There is no upload step, no account, and no copy kept anywhere. You can load the page, disconnect from the network, and the tool still works.
Why did my PNG become a WebP?
PNG is a lossless format, so re-encoding a PNG as a PNG usually saves very little — there is no quality dial to turn. WebP keeps transparency like PNG does but compresses far harder, which is why it is the default for PNG sources. You can still pick "Keep PNG", which leaves the format alone and reduces the file only by reducing its dimensions.
What quality should I pick?
For photographs, 75-85 is the usual sweet spot: the file drops a lot and the difference is hard to see at normal viewing size. Below about 60 you start to notice blocking in skies and smooth gradients. Flat graphics, screenshots and text-heavy images are less forgiving of lossy compression, so keep those higher or leave them as PNG.
Does compressing lose quality?
With JPG and WebP, yes — they are lossy formats, and the discarded detail does not come back. Compressing an already-compressed JPG applies a second lossy pass on top of the first, so work from the best original you have rather than re-compressing an export repeatedly. Scaling dimensions down is also irreversible. Keeping PNG is the only lossless path here, and it only saves space when you also reduce the dimensions.
Related
For the reasoning behind the settings — when to resize before compressing, what sizes web pages actually need, and how to check the result — read how to reduce image file size, the full guide this tool implements. If you are unsure which output format to pick, compare them in WebP vs PNG vs JPG.
