Compress image files before you send them
Compress image files when a form caps the attachment or a photo is heavier than the layout needs. You can keep JPG, PNG, or WebP, or switch among those three. Quality starts at 80. A target size of 0 leaves that hunt off, and a max side of 0 keeps the pixel size. Metadata is stripped unless you turn that off. The work stays in this tab.
Loading tool…
or drop / paste
How to compress image files
- Add one or more JPG, PNG, or WebP files. You can drop them, paste, or use Choose files. Up to one hundred files are accepted in one run.
- Leave output on Keep format, or pick JPG, PNG, or WebP if the destination has to change. Keep format follows the file you added.
- Leave quality at 80 unless you already know you need a smaller or sharper file. Set target size in KB only when you have a real cap. Zero means off.
- Leave max side at 0 to keep the dimensions. Set PNG effort from 1 to 4, default 2, and turn on Reduce colours only for a PNG that is still too big.
- Leave Strip metadata on unless you still need the camera note. Press Compress images, then download each file, or a ZIP when more than one result is ready.
Compress image options explained
Quality defaults to 80. Lower values usually make a smaller file and throw away more detail. Higher values keep more of the picture and usually stay larger. Quality 100 on a JPEG, with no resize and metadata stripping on, is a special case described below.
Target size is in kilobytes, and 0 means the control is off. A non-zero target tries to land at or under that size. For JPEG and WebP it searches quality. For PNG it can posterise and then scale down if the first encode is still over the cap.
Max side is in pixels, and 0 means keep the current dimensions. A non-zero value shrinks the longest edge to that length and scales the other edge with it. It does not enlarge a file that is already smaller.
Reduce colours applies to PNG. It posterises the picture to 32 levels, then runs OxiPNG. PNG effort runs from 1 to 4 and defaults to 2. Strip metadata is on by default and removes the camera note and embedded extras.
Which encoder actually runs
A compress image pass is not one codec for every file. If the input is JPEG, the output is JPEG, quality is 100, max side is 0, target size is 0, and stripping is on, the file is remuxed. The compressed scan stays, so the pixels do not change. Camera segments are dropped.
Any other combination re-encodes. JPEG output goes through MozJPEG. WebP output goes through a WebP encode at the quality you set. PNG output goes through OxiPNG. If you also set a max side, the bitmap is scaled before that encode, so the remux path no longer applies.
Target size and the longest edge
Leave both target size and max side at 0 when you only want the quality slider to do the work. That is the predictable path: one encode, dimensions unchanged, metadata stripped if the toggle is still on. Turn a control on only when a form named a number.
If a JPEG or WebP is still over the target after the quality search, the picture is scaled down in steps until it fits or the ladder stops. A PNG target can posterise first, then scale. That scale changes pixels. Read the before and after sizes before you replace the original.
What this page will not do
This page does not decode HEIC, AVIF, or SVG. Those have their own tools. It does not invent a print size, and it does not offer a DPI field. If you need new pixel dimensions as the main job, use resize image, which can also write density metadata without adding pixels.
Colour reduction is not a gentle extra. It is a deliberate lossy step for PNG, then OxiPNG packs the result. Leave it off when the graphic has smooth gradients or a photo you still care about. Effort 4 spends more time for a chance of a smaller lossless PNG, not a different picture.
Common targets
Limits, formats and output
| Accepted input | JPEG, PNG, WEBP, GIF, BMP, HEIC, AVIF |
|---|---|
| Files per batch | 1–100 |
| Soft size warning | 50 MB each |
| Hard stop | 500 MB total in memory |
| Output | The chosen image format, or a ZIP for a batch |
| Account | None. The tool runs in this tab. |
Your file never leaves your device
This image is compressed by a script running in this browser tab. The work runs in a Web Worker in this tab, using WebAssembly for the heavy parts, and the result comes back as a local blob. This site does not upload the file, store it, or log its name.
To verify: load the page, turn on airplane mode, and drop the file again. It still finishes. Or open DevTools, choose Network, and watch the run: there is no upload. The architecture is described on How it works.
Frequently asked questions
Does quality 100 change a JPEG?
Not when max side and target size are both 0 and metadata stripping is on. That path remuxes the JPEG, so the pixels stay as they were and the camera segments are removed. Change quality, resize, or turn stripping off, and MozJPEG encodes the pixels again.
Will a target size always be reached?
The tool tries. JPEG and WebP search quality, then scale if needed. PNG can posterise and scale. A tiny target on a huge photo may still miss. The result you download is the smallest attempt it kept, and the original file remains in the list.
What does PNG effort change?
Effort runs from 1 to 4 and defaults to 2. Higher effort asks OxiPNG to work harder on the same pixels. It does not posterise. Posterising only happens if you turn on Reduce colours, or if a PNG target size still cannot be met without it.
Can I compress several images at once?
Yes. Add up to one hundred JPG, PNG, or WebP files. Each file is handled on its own with the same settings. When more than one result is ready, you can download them together as a ZIP.
Does compress image work offline?
After the page and the codec files have loaded once, yes. The service worker keeps them. Turn the network off and run the same file again. That is also a check that the bytes were not sent anywhere the first time.
Is metadata removed by default?
Yes. Strip metadata starts on. JPEG camera segments are dropped, and PNG text chunks are dropped. Turn the toggle off only when a later step still needs that note. WebP output is a fresh encode, so the old container notes do not ride along.
Last updated 2026-09-26. By Tam.