Image Compressor

Re-encode a browser-supported image and compare its output size. JPEG quality is adjustable; PNG keeps transparency.

How to Use

1

Choose an image

Select a file no larger than 20 MB that your browser can decode.

2

Adjust JPEG quality

For non-PNG input, compare the preview at different quality levels. PNG quality is fixed by the browser encoder.

3

Inspect size and appearance

Check readability, transparency, and whether the generated output is actually smaller.

4

Download and reopen

Keep the original image and check the exported file in its destination application.

Choose settings that match the output

The tool draws the decoded image to a canvas at its original pixel dimensions. PNG input produces PNG output; other supported images produce JPEG output. The quality slider applies to JPEG only. PNG transparency is retained; JPEG output uses a white background.

Check the result

Start with the default 80% quality for JPEG, inspect the preview, then lower quality if needed. Compare actual generated bytes and reopen the downloaded file. Re-encoding can increase file size, so a saving is not guaranteed.

How It Works

Output size is calculated from decoded Base64 bytes, excluding the data URL header and padding. Saving (%) = (input bytes − output bytes) / input bytes × 100 A 200,000-byte input and 150,000-byte output save 25%. A larger output is reported as larger, not as a successful reduction.

Frequently Asked Questions

Why does the PNG quality slider not work?▼
Canvas PNG export does not use the quality argument. The slider is disabled for PNG. Reduce pixel dimensions with the Image Resizer if appropriate.
Why is my result larger?▼
The source may already be well compressed. A different encoder or output format can produce more bytes; no reduction is guaranteed.
Are animation and metadata preserved?▼
No guarantee is made. Canvas exports a new still image and can discard animation, metadata, and color-profile information.
Can a file below 20 MB still fail?▼
Yes. Decoded pixel dimensions can exceed the browser’s canvas or memory limits even when the compressed file is small.

Limits and assumptions

  • 20 MB input-file limit; decoding also depends on browser codec and memory support.
  • PNG quality is not adjustable. Non-PNG input is exported as JPEG.
  • Animation and original metadata are not preserved; smaller output is not guaranteed.

Worked guides

References

Documentation updated on . How we review tools

Related Tools

Explore other tools in this category.

Looking for something else?