Image Compressor
Compress and resize a JPG or PNG — set quality, max width/height, output format and a JPEG background. Free and private in your browser; also available as a paid API.
Input
Lower quality gives a smaller file.
Fills transparency when exporting to JPEG.
Compressed image
Add images and press Compress — everything runs in your browser.
Guides
Shrink a JPG or PNG to a smaller file size. Pick a quality level and, optionally, change the output format — the tool re-encodes the image and hands you the smaller file to download.
How to use it
- Drop or choose one or more JPG or PNG images (up to 20 at once).
- Set the Quality slider (lower means smaller; JPEG only — PNG stays lossless).
- Optionally cap the Max width/height to shrink oversized photos (it only downscales, never upscales — leave blank for no limit), set the Output format, and pick a Background for JPEG (used to fill transparency when a PNG is exported to JPEG).
- Press Compress, then download each result — or Download all (.zip) when you've compressed several at once.
Free in your browser, private by default
In the browser the whole thing runs on a canvas — your image is never uploaded. Nothing leaves your device, and there's no size limit beyond what your browser can hold in memory.
Is there an API?
Yes. The same compressor is available as a paid developer API (POST /v1/tools/image-compressor) for automating compression in a script or backend,
where running a browser isn't practical. The API re-encodes server-side and
costs one credit per image; the in-browser tool on this page stays free.
JPEG vs PNG
JPEG uses lossy compression, so the Quality slider trades visible detail for a much smaller file — ideal for photographs. PNG is lossless: it's the right choice for graphics, screenshots and images with sharp edges or transparency, but the quality slider has no effect on it.
Why isn't WebP an option?
The browser and the API deliberately expose the same formats (JPEG and PNG) so a compression done here can be reproduced identically through the API. WebP is left out because the two sides don't encode it identically.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/image-compressor \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA…",
"quality": "60",
"maxWidth": "1920",
"maxHeight": "1920",
"outputFormat": "jpeg",
"background": "#ffffff"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `image-compressor` tool (Image Compressor) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.