Skip to main content
Calnex LogoCalnex
Developer Tool

Smart Image Compressor & Converter

Compress and convert JPG, PNG and WebP images in the browser using HTML5 Canvas, with adjustable quality, resize scale and output format.

Drag & drop images here, or click to browse

Supports JPG, PNG, WebP. 100% local processing — no upload bandwidth consumed.

Compression Configuration

Lower values reduce size. Photos usually work well at 70%-85%.

80%
SmallerHigher quality

Scale down image dimensions to save tons of storage.

100%
ThumbnailOriginal size
Output FormatOutput
Set compression preferences before upload.

What happens after upload

Everything runs locally in your browser.

Detect image properties

Checks dimensions and alpha safety.

Apply current settings

Quality, scale, and format shape the output.

Show before/after preview

Compare visual quality and file size.

100% Client-Side Privacy Guarantee

This tool uses native HTML5 Canvas compression. All processing runs locally in your browser sandbox — your private images will never be uploaded to any server.

This page re-encodes images locally in your browser and lets you compare original and compressed sizes before downloading. It supports JPG, PNG and WebP inputs with quality, resize scale and output format controls.

Does the quality slider affect PNG output?

No. The quality value is passed only to lossy MIME types (image/jpeg and image/webp). PNG is encoded without a quality argument, so changing the slider will not change a forced-PNG result; use Resize Scale or a lossy format to reduce PNG size.

When is my original file kept instead of the compressed one?

The original is kept only when the best encoded blob is not smaller than the source, Resize Scale is exactly 1.0, and the format is Auto or Original. In that case savings show 0 percent. If you force WebP, JPG or PNG, or set a scale below 1.0, the encoded result is used even if it is larger.

Examples and interpretation (2)

How do I compress a flat-color PNG screenshot with default settings?

  1. Set Compression Quality to 0.8, Resize Scale to 1.0, Output Format to Auto, and upload a 2.4 MB PNG without transparency.
  2. The canvas is drawn at full size; Auto tries its supported candidates and selects the smallest encoded blob. If it is not smaller than the original at scale 1.0, the original is retained. Compare the previews and sizes, then download the selected result.

The selected format depends on the actual encoded sizes and browser support. The savings compare the downloaded result with the original file; no particular ratio or winning format is guaranteed.

How do I keep transparency when converting a logo?

  1. Set Output Format to PNG, leave Compression Quality at 0.8 and Resize Scale at 1.0, and upload a transparent PNG.
  2. The canvas is checked for alpha; PNG is encoded without the quality value. The preview shows the alpha channel preserved and the download extension is png.

At forced PNG output, quality is omitted and the encoded result is used even when it is larger. The original-file fallback applies only to Auto or Original at scale 1.0 when the best encoded candidate is not smaller.

Frequently Asked Questions

What does the Auto output format actually choose?

Auto builds a candidate list: WebP first, then JPEG only if the canvas has no transparency, then the source MIME type, then PNG. It encodes each and keeps the smallest blob. If that blob is not smaller than the source, scale is 1.0 and the format is auto or original, the original file is kept.

How are image previews and downloads created?

This code path decodes images into a browser canvas, encodes candidate blobs and creates object URLs for the preview and download. It compares file sizes; it does not measure perceptual image quality.

Why is my compressed file sometimes larger than the original?

Re-encoding can add bytes, especially for already-optimized files or when forcing a format. The original is kept only when the best blob is not smaller, scale is 1.0 and format is auto or original; otherwise the encoded result is used and savings are clamped to 0 percent when the output is not smaller.