PNG, JPEG & WebP Image Compressor

Re-encode PNG, JPEG or WebP images locally. Compare original and result sizes and choose output quality.

Drop files here. Files stay on your device.

How to use

Choose an output format and a quality value. JPEG and WebP use the browser encoder’s quality setting; PNG ignores that setting because its pixel encoding is lossless. Original pixel dimensions are retained.

The result reports originalBytes and resultBytes instead of promising a fixed saving. A small optimized source can become larger after re-encoding. Try a lower quality or another format, then inspect the downloaded image.

Behavior and limits

Input limit: 40 MiB, 40 million pixels and 10,000 pixels per side. Re-encoding is not a guarantee that all private metadata has been removed. JPEG uses white behind transparent areas. Animation is not supported.

Questions & answers

Is every format lossless?

No. JPEG and the browser WebP quality encoder can lose detail. PNG preserves the re-rendered pixels, but rendering can still change metadata or color interpretation.

Can I use this without uploading data?

Processing runs on your device. Input is not sent to a conversion API. Keep the page open until the result is ready.

Other Languages

Image Compressor — Base64.sh

PNG, JPEG & WebP Image Compressor

Re-encode PNG, JPEG or WebP images locally. Compare original and result sizes and choose output quality.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Check actual shared size/coordinate/quality functions against explicit geometry results, including invalid/out-of-bounds inputs.
Comparison reference
Fixed geometry/parameter assertions: swapped dimensions for rotation, crop bounds, resize ratios and compression type/quality.
Verification scope
These parameter checks are not independent image-codec or visual-quality verification.
Test source and cases (select a file to read it)
  • file-extra.test.js
    • image compression accepts only supported quality ranges and output types

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.