Image Compressor
Re-encode to JPEG/WebP/PNG, hit an exact target size, or batch several photos into one ZIP.
What is Image Compressor
The Image Compressor re-encodes an uploaded image to JPEG, WebP or PNG to reduce its file size. You can set the quality directly (10–95%), or enter a target size such as 200 KB and the tool searches for the highest quality that fits, then steps the resolution down if it still overflows — so it always lands under the limit. That is exactly what upload forms mean by "photo must be under 200 KB". Everything runs on the Canvas API inside your browser; the file never leaves your device (5 MB per image). Select several images and you get one ZIP — free up to 5 images, Pro up to 50.
File
… up to 5 files
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Size limit
- 25 MB free, 25 MB with Pro
- Files per run
- 5 free, 50 with Pro
- Offline
- Works with the network disconnected
Quality is searched, not guessed
The encoder starts at quality 0.95 and, if the result is larger than the requested target, binary-searches downward — re-encoding and measuring until it lands under the size or runs out of attempts. That is why the output size tracks the target rather than being a fixed percentage of the input.
The search has a floor. Below roughly 0.4, JPEG artefacts become worse than the size saving and the image looks damaged rather than compressed. If the target cannot be reached above the floor, the honest outcome is to say so, not to keep degrading.
Which format to compress to
JPEG for photographs, where discarding high-frequency detail is invisible. PNG for screenshots, diagrams and anything with text or flat colour, where JPEG produces ringing around letters that no quality setting removes. WebP is smaller than both at equivalent quality and is supported everywhere current.
Compressing a PNG that is already PNG-optimised with a lossy encoder is the mistake that produces a blurry screenshot. If the image is text on a solid background, the right move is usually a palette reduction, not a quality reduction.
Metadata: stripped by default, and that is usually right
Re-encoding through a canvas drops EXIF, which removes GPS coordinates and camera serial numbers — a real privacy gain that most people do not expect from a compressor. It also drops the orientation flag, so an image that relied on EXIF rotation will appear sideways after compression.
That pairing is worth knowing before bulk-compressing photos from a phone: the size goes down, the location data goes away, and some images arrive rotated. Re-applying orientation from the EXIF value before drawing is the fix, and it has to happen before the metadata is discarded.
How to use it
- 1.Choose an image file
- 2.Pick format and quality, then run
- 3.Download the compressed image
How Image Compressor works under the hood
Every image operation here is decode → transform pixels → re-encode. That order matters: it explains both why resizing is exact and why repeated compression slowly degrades a photo.
- 1
Decode to a pixel buffer
The browser's own decoder turns the file into RGBA pixels. EXIF orientation is applied at this step so portrait photos are not sideways.
- 2
Draw at the target size
The pixels are drawn onto a canvas at the requested dimensions with high-quality smoothing, which is where resampling actually happens.
- 3
Encode with a chosen quality
canvas.toBlob re-encodes to JPEG, WebP or PNG. Quality applies to lossy formats only; PNG ignores it and stays lossless.
- 4
Hand back a Blob
The encoded bytes become a download link. No network request is involved at any point.
Processing pipeline
Why the file gets bigger sometimes
Re-encoding is not free. Converting a small, well-compressed JPEG to PNG usually makes it several times larger, because PNG is lossless and must store every pixel exactly. The same happens when a JPEG is re-saved at quality 1.0. If size is the goal, keep the format and lower the quality; if transparency is the goal, PNG or WebP is the right choice.
Metadata is dropped on purpose
Camera EXIF can contain GPS coordinates, device serial numbers and timestamps. Re-encoding through canvas writes fresh pixels and no metadata, which is a privacy win but means the location tag is gone. If you need metadata preserved, this pipeline is the wrong tool.
Formats the browser cannot open
HEIC and HEIF (the default on recent iPhones) are not decodable by most browsers, so they cannot be converted client-side. TIFF and some camera RAW formats fail for the same reason. There is no server fallback here by design — the file never leaves your device, so if the browser cannot read it, the tool cannot either.
Verify it yourself
Re-encoding happens locally. Check the network panel while it runs.
- 1.Open DevTools on this page and switch to the Network tab
- 2.Keep the filter on Fetch/XHR and run the tool
- 3.Confirm no request carries your file — you should see only page assets and fonts
Frequently asked questions
Which output formats are supported?
JPEG, WebP and PNG. PNG is lossless so the quality setting is ignored — pick JPEG or WebP for real size savings.
What quality should I pick?
75–85 is a good range for the web. Below 60 artifacts become noticeable.
How do I compress a photo to under 200 KB?
Choose JPEG or WebP, type 200 into the target size field and run. The tool binary-searches the quality and, if needed, lowers the resolution until the file fits under 200 KB. The line under the download shows the final size, quality and pixel dimensions so you can check small text is still legible before uploading.
Will text stay readable after compression?
Around quality 60–70, printed text in a document photo is usually still readable. If the target is very small (say 50 KB) the resolution drops a lot — resizing to about 1000 px wide first gives a sharper result than squeezing an 8 MP photo.
Can I compress several photos at once?
Yes. Select multiple files and each one is compressed, then packed into a single ZIP. The free tier handles 3 images, Pro up to 50.
What this kind of conversion cannot keep
Image work happens on a canvas: the file is decoded, drawn, re-encoded and handed back as a download. Nothing is uploaded, so a 20 MB photo costs you nothing but a few seconds. Re-encoding always loses a little quality — that is true of every tool, including desktop software.
Go deeper
More in Image
On this page
- What is Image Compressor
- What this tool actually does with your file
- How it actually behaves
- How to use it
- How it works inside
- Frequently asked questions
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →