
To compress an image or photo into a smaller file, start with a suitable output format, reduce JPEG or WebP quality a little, and resize the image if you do not need its full dimensions. Check the result before replacing your original. You can do all three with the tool below, directly in your browser.
Compress an image in five steps
- Choose your images. Add static JPG, PNG or WebP files. You can process a batch, but start with a few images to find settings you like.
- Choose the output format. Keep original format is selected by default. If a website or application specifically needs a different format, select JPG, PNG or WebP as appropriate. The Web ready preset is an optional WebP conversion with downsizing.
- Set quality and dimensions. The homepage starts at 82% quality with resizing off. Enable resizing only if fewer pixels suit your destination; the initial maximum long edge is 1920 pixels. The quality slider applies to JPG and WebP, not PNG.
- Click Compress images. Read the actual size and dimensions beside each result. Click Compare to inspect changes; the comparison displays both images at the same size.
- Download your results. Use the arrow beside an image or Download ZIP for the completed batch. Save your files before clearing the list or leaving the page.
Compress photos to a target size
For email attachments and upload limits, choose 100 KB, 200 KB, 500 KB or a custom limit. JPG/WebP quality is searched up to your selected maximum; smaller dimensions are tried only with your permission. Check the Target met or Above target label and inspect faces, hair and fine detail before sharing the photo.
File size and image dimensions are different
File size is the amount of storage an image uses, measured in bytes, KB or MB. Dimensions describe its width and height in pixels. Lowering quality can reduce bytes while keeping dimensions the same. Resizing changes the pixel dimensions too: a 2400 × 1600 image fitted to a 1200-pixel long edge becomes 1200 × 800.
Why did the file stay the same size?
An already efficient image may not shrink at the selected settings. When a same-format, same-dimension result would be larger, this tool keeps the original. Converting formats or resizing can still produce a larger file, so always check the displayed result.
Choose settings for the image’s destination
Fine text, screenshots and small logos can show compression artifacts more clearly than many photographs. Inspect edges and lettering, and increase quality if necessary. Keep a separate original for future editing. This tool does not promise unchanged visual quality or a fixed reduction percentage.
Your image files are processed locally in this browser tab. JPG output turns transparent areas white. Re-encoding may change color handling. Preserve supported metadata now keeps EXIF photo dates, camera details and GPS; an original kept by the tool retains all its existing metadata.
Further reading: MDN’s explanation of browser image encoding.
Choose whether to keep photo metadata
Preserve supported metadata is selected by default. EXIF dates, camera details and GPS are retained when present, while orientation and dimensions are updated for the newly encoded pixels. PNG text and dates, and JPG comments, stay when keeping their format. XMP, IPTC and original colour profiles are not transferred during re-encoding; embedded preview links are cleared. Retained data counts toward target file sizes.
Choose Remove metadata to omit source metadata. This always re-encodes and disables the original-file fallback, so a result may be larger. For metadata removal without recompressing the image pixels, use Metadata Remover. Downloaded file creation and modification dates are separate from an embedded photo date and may change.
Behind the result
Compression changes the representation of pixels; resizing changes how many pixels there are. Start with quality, compare at full size and resize only when the destination permits it.
What does encoding mean?
Decoding turns the bytes in an image file into pixels that a browser can display. Encoding turns pixels back into a file, using the rules of JPG, PNG or WebP. It is not encryption. Our compression and conversion tools decode locally, draw the image onto a canvas and call the browser’s canvas.toBlob encoder. The browser supplies the codec, so results can vary between browsers.
How JPG compression works
JPEG commonly splits image information into small blocks, uses a discrete cosine transform to describe patterns within them, then rounds transform coefficients in a step called quantization. Coarser rounding saves space but discards detail. The remaining values are efficiently coded into bytes. Our quality control is passed to the browser encoder; it is not a percentage of original detail retained or a guaranteed percentage reduction. Repeated JPG re-encoding can introduce additional artefacts.
How PNG encoding works
PNG uses reversible filters on pixel rows followed by DEFLATE compression. These steps can represent the encoded pixels without JPEG-style quality loss. PNG ignores the quality slider. This tool uses the browser’s PNG encoder, rather than a dedicated palette-reduction optimiser, so an already efficient PNG may not get smaller. Resizing or colour handling before encoding can still change pixels; lossless encoding does not promise that the whole editing pipeline preserves the original file.
How WebP compression works
Lossy WebP predicts image regions from neighbouring pixels, transforms the difference and quantizes it before coding the result. The format also supports a separate lossless mode, but this tool requests browser WebP encoding with a quality setting and does not expose a guaranteed lossless mode. Transparency can be retained. A lower quality setting often reduces size, although sharp text and fine textures may suffer.
Why the original may be kept
After encoding, the tool compares byte sizes. With Preserve supported metadata selected, when format, dimensions and geometry are unchanged and the new file is not smaller, it keeps the original bytes. This avoids a larger replacement. A retained original also retains its metadata: use the Metadata Remover when privacy cleaning is the goal. ZIP download bundles the files without another lossy image-encoding step.
Where processing happens
Your selected image is processed on your device, without an image upload. Canvas exports are new files and may change embedded metadata or colour information. Keep a master copy for archival work. Animated PNG and animated WebP are rejected; these tools handle static images.
How target-size compression works
Choose 100 KB, 200 KB, 500 KB or a custom decimal-KB limit. For JPG/WebP, the tool tries quality values from your selected maximum down to 10% and refines a successful bracket with a bounded binary search. When you explicitly allow smaller dimensions, it can also try up to eight downsizing steps. PNG ignores quality. Exact resizer dimensions are preserved. Only a measured output within the byte limit is marked Target met; otherwise the smallest tested candidate is marked Above target. This is a bounded search, not proof of a globally optimal result.
Metadata choice
Preserve supported metadata is the default: EXIF dates, camera and GPS fields are copied, with orientation reset after decoding and dimensions updated. PNG text/dates and JPG comments stay within their format. XMP, IPTC and original colour profiles are not transferred; embedded preview links are cleared. Retained metadata is included in target-size measurements. Remove metadata omits source metadata and disables the original-file fallback. Filesystem download dates are separate.
Explore the details: Browser encodingImage formats — MDN
