[comprimage]

Convert formats

Change between JPG, PNG, WebP, AVIF, and JPEG XL with local WebAssembly codecs.

[ how it works ]

How to convert between JPG, PNG, WebP, AVIF, and JPEG XL

Every image format makes a different trade between file size, fidelity, features, and how many browsers can open it. Picking the right one is usually worth more than any amount of quality-slider tuning.

  1. 1

    Drop in the source image

    JPG, PNG, WebP, AVIF, and GIF are all accepted as input, up to 50 MB per file. The browser decodes it to raw pixels locally — no upload, no queue, no account.

  2. 2

    Choose the target format

    Convert to JPG, PNG, WebP, AVIF, or JPEG XL. AVIF and JPEG XL are encoded through WebAssembly, which means Comprimage can produce them even in browsers whose own canvas cannot.

  3. 3

    Tune, compare, and download

    Lossy targets expose quality and effort; supported formats also offer lossless output and chroma subsampling. The result is shown against the original with the new file size before you save it.

[ which format to choose ]

JPG — universal, photographs only

Supported by literally everything and still a safe default for photos when compatibility matters most. It has no transparency and no lossless mode, and it handles sharp edges and flat colour poorly. Comprimage encodes it with MozJPEG, which is meaningfully more efficient than a standard JPEG encoder.

PNG — lossless, for graphics

The right choice for screenshots, logos, diagrams, and anything with transparency or hard edges. It is lossless, so the quality control does nothing; size reductions come from OxiPNG optimisation instead. Avoid it for photographs, where files become very large.

WebP — the safe modern default

Supported by every current browser and typically 25–35% smaller than an equivalent JPEG. It handles both photographs and graphics, supports transparency, and has a lossless mode, which makes it the best single replacement for both JPG and PNG on the web.

AVIF — smallest files, slower to encode

Usually beats WebP again on file size, especially at low quality and on smooth gradients, and supports transparency and lossless. Browser support is now broad but encoding costs noticeably more CPU time, so it rewards patience.

JPEG XL — excellent, limited support

Very strong quality-per-byte with a genuinely useful lossless mode. Browser support remains limited, so treat it as an archival or pipeline format rather than something you serve directly to visitors.

A note on animation

Animated GIFs can be used as input, but conversion takes the first frame — output is always a still image. Converting between lossy formats also re-encodes rather than recovering detail, so go back to the highest-quality original you have wherever possible.

[ common questions ]

Is AVIF better than WebP?
AVIF usually produces a smaller file at the same visual quality, with a clear advantage on smooth gradients and at aggressive compression levels. WebP encodes far faster and has slightly wider support, so it remains the safer default unless file size is your priority.
Does converting an image reduce its quality?
Converting to a lossy format such as JPG, WebP, or AVIF re-encodes the image and discards some detail. Converting to PNG, or enabling the lossless switch on WebP, AVIF, or JPEG XL, preserves every pixel exactly.
Can I convert a PNG to JPG and keep transparency?
No — JPG has no alpha channel, so transparent areas are flattened. If you need transparency in a smaller file, convert to WebP or AVIF instead; both support alpha and compress much better than PNG for photographic content.
Are my files sent anywhere during conversion?
No. Every codec runs as WebAssembly inside your own browser tab. Your images are never uploaded, which is also why conversion works with no network connection once the page has loaded.