IMAGE TOOLS

Image Compressor

Re-encode an image and compare the original and new files side by side. Choose JPEG, PNG, or WebP and, for lossy formats, a quality level. Everything runs in your browser; RandomTools does not upload the image to an application server, and the tool never claims a saving unless the new file is actually smaller.

STEP 1

Choose an image

No image selected yet.

How the image compressor works

The browser decodes your file, draws it onto a canvas at its original dimensions, and encodes that canvas in the format and quality you select. The new file stays in memory and is offered as a download. RandomTools does not upload it to an application server, and the original file on your device is not modified.

Because the tool re-encodes the decoded pixels, it does not copy the source file's metadata, and it does not preserve animation. A GIF becomes a single still frame. Text, sharp edges, and flat areas may change differently from photographs, so always compare the previews before using the result.

Lossy and lossless formats

JPEG and WebP are lossy at the quality levels used here: the encoder discards detail to reduce size. JPEG has no transparency and is drawn on a white background. WebP keeps transparency and often produces a smaller file than JPEG at a similar visual quality in browsers that support it.

PNG is lossless. The quality control is disabled because PNG does not use it. Transparency is kept, but re-encoding a PNG can easily produce a bigger file than the original. If the comparison says the new file is larger, that is the measured result; the download is still available so you can decide which version to keep.

If the browser cannot produce the format you asked for, the tool reports the mismatch and does not offer a misleading download. A quality setting is a hint to the encoder, not a size target.

Image compressor FAQ

Why is my compressed file larger?

Compression depends on the source. An already optimized JPEG, a PNG with a limited palette, or a change to a lossless format can all grow. The tool shows both sizes and the percentage change, and it never labels a larger file as a saving. Try a lower quality for JPEG or WebP, or keep the original.

Does quality apply to PNG?

No. PNG is lossless and the browser's PNG encoder does not use a quality value. The slider is disabled for PNG so the setting cannot be mistaken for a size control.

Is my image uploaded?

No. The file is decoded and re-encoded in this page. The privacy policy explains the hosting and advertising integrations, including the disclosed third-party script that runs in the same page context.

Need different pixel dimensions as well as a smaller file? Use the image resizer first. To remove unwanted edges before encoding, use the image cropper.

Last updated: