
Choose a format for the image and its destination. JPG is a practical photographic format, PNG uses lossless encoding and supports transparency, and WebP supports transparency with quality-controlled output in this tool. No format wins on every image.
Compare the formats
| Format | Useful for | Transparency | Important trade-off |
|---|---|---|---|
| JPG | Photos accepted by older upload forms | No | Lossy encoding can soften text and edges. |
| PNG | Graphics, screenshots and transparent artwork | Yes | Detailed photographic files may be large. |
| WebP | Web images where the destination accepts it | Yes | This tool uses quality-controlled encoding, not a guaranteed lossless mode. |
Measured examples from our browser tests
In a desktop Chrome test on 26 October 2026, a generated 1800 × 1200 JPG sample decreased from approximately 1.04 MB to 269.9 KB with the homepage’s default 82% quality and unchanged dimensions. A generated 900 × 900 PNG sample stayed at 442.5 KB because the re-encoded version was not smaller and the tool retained the original. These are examples, not a benchmark predicting your files; the displayed sizes use 1,024-byte units.
When those samples were centre-cropped to 600 × 600, one JPG result was 25.4 KB and the PNG result was 186.3 KB. Different source artwork means those numbers are not a fair format-versus-format comparison. They illustrate why content, dimensions and settings all matter.
Run a fair comparison with your image
- Use the same source for every output.
- Keep dimensions unchanged and choose JPG, PNG, then WebP.
- Download each result before changing settings.
- Compare exact sizes, text clarity, gradients and transparent edges at full resolution.
Choosing for transparency and repeated editing
PNG or WebP can keep transparent pixels. JPG fills them with white in the converter. Converting JPG to PNG does not restore previously discarded detail or remove a background. Preserve a master copy and make delivery copies for each destination.
Format support matters
A smaller WebP is not useful when a form requires JPG. Follow the destination’s format and dimension requirements, then choose the clearest result that fits. Read the MDN image format reference for format details.
Behind the result
Compare image quality, transparency and file size, with measured examples and tools to try each format.
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
