LeanImg

Compress Images to WebP

Choosing WebP is itself a compression decision: the same pixels described by a codec nearly two decades younger than JPEG usually need fewer bytes. This page converts JPG or PNG to WebP on your own hardware and puts the measured result next to the original, because the interesting question is never whether WebP can be smaller — it is whether it was, for your image, at the setting you used. The table below is one real photograph taken through four different encodes.

Loading compressor...

One photo, four encodes, measured

OutputSizeSaving
JPEG, slider 80286.1 KB47% smaller
WebP, slider 80290.3 KB46% smaller
AVIF, slider 80312.7 KB42% smaller
WebP, slider 63200.6 KB63% smaller
LeanImg compressor converting texture.jpg to WebP, 538.6 KB down to 200.6 KB
The same photo written to WebP at quality 63: 538.6 KB down to 200.6 KB.

One slider, three encoders, three meanings

The table disagrees with every WebP-versus-JPEG chart on the internet: at the same slider position, WebP landed a few kilobytes above JPEG and AVIF above both. The explanation is not the codecs but the slider. Each encoder receives the number differently. The JPEG path interprets it relative to how compressed the source already was, so its 80 quietly became a lower effective setting; WebP and AVIF both took 80 at face value, and for AVIF — tuned to look good far lower — 80 is a luxury setting nobody benchmarks.

Give each codec the quality it was designed around and the ranking flips. Smart mode does exactly that: WebP stays at its flat default of 80 while AVIF drops to 63, and at those settings the same photograph came out at 200.6 KB as WebP and 186.9 KB as AVIF. A cross-format comparison made with one shared slider number measures the slider, not the formats.

Lossy, lossless, and what this tool writes

WebP is really two file types sharing an extension. The lossy half descends from the VP8 video codec and works like a stronger JPEG: guess each block from the blocks around it, then encode only the error. The lossless half is an unrelated scheme closer in spirit to PNG. The two never blend — a lossy WebP at quality 100 is still a lossy file — and this compressor writes the lossy kind only, whatever the slider says.

Transparency survives regardless: WebP carries an 8-bit alpha plane in both halves, and in a lossy file that plane is stored without loss while the colour around it sheds weight, so a cut-out product shot keeps a clean silhouette. The trade to know about is colour resolution — the lossy bitstream always records colour more coarsely than brightness, with no switch to prevent it. Photographs never show it; saturated text, thin coloured lines and pixel-perfect UI art can. Images like that are better served by the quantized PNG route than by any lossy codec.

Animation, and serving WebP safely

The WebP format animates; this tool does not. Whatever comes in, exactly one frame comes out. Animated GIF input is detected, and the result card warns that only the first frame survived. An animated WebP, APNG or animated AVIF is currently not detected: it returns as a single-frame still with no warning, and the spectacular size reduction reported for it is mostly the vanished frames rather than clever encoding. Until that detection exists, treat any implausibly good result on an animated file with suspicion and keep animations away from this page.

On the serving side the compatibility worry is mostly historical: every current browser decodes WebP and has for years. The stragglers are applications, not browsers — older image viewers and some email clients still refuse it. The standard defence is to keep a JPEG or PNG copy alongside and let a picture element offer both, so modern visitors get the small file and everything else gets one it understands. Adopting WebP never requires abandoning the originals.

Frequently Asked Questions

Is WebP really smaller than JPEG?

For photographs at genuinely matched visual quality, yes — Google's published studies put the saving in the 25 to 34% range, and the smart-mode encodes in the table agree. A matched slider number is not matched quality, though, which is exactly how the naive comparison in the same table puts JPEG narrowly ahead.

Does converting a JPG to WebP lose quality?

It adds one lossy generation, which at quality 80 on a photograph is practically invisible. What deserves caution is round-tripping: WebP back to JPEG and out again compounds the damage each time, so convert once, from the best source you have, and keep that source.

Will transparency survive conversion to WebP?

From PNG input, yes: alpha is part of both WebP modes, and in the files this page writes the transparency plane itself is not degraded by the lossy encoder. From JPEG input there is nothing to preserve, since no JPEG has ever carried an alpha channel.

What happens to animated files here?

They leave as single stills. An animated GIF is at least flagged on its result card; an animated WebP, APNG or AVIF loses its frames silently, and the reported saving is then misleading. A tool that keeps animation intact is the right choice for those files — this one is built for still images.

Which browsers still cannot display WebP?

Effectively none that receive updates: Chrome, Firefox and Edge have decoded it for many years, and Safari has since 2020. The holdouts are elderly applications rather than browsers — a fallback JPEG or PNG copy covers them.

Should I pick WebP or AVIF as the output?

AVIF wins on bytes — 186.9 KB against WebP's 200.6 on the test photo — and loses on time and compatibility: it pushes the AV1 encoder through WebAssembly, which is noticeably slow, and old software is likelier to open a WebP. For batches and general use, WebP; for a website where every kilobyte counts, AVIF.

Can this page shrink a WebP I already have?

Yes. WebP is accepted as input, and with the format left on Keep original it re-encodes back to WebP. The slider is taken literally on that path — nothing is rescaled against the source — so move it below the level the file was made at and compare the measured sizes before downloading.

Can I convert a WebP back to JPG or PNG?

Yes — run it through this compressor with a different output format, or use the dedicated converters on this site. What no tool restores is detail an earlier lossy encode discarded, so make conversions from originals rather than from other conversions.

Other compression guides

Compress Images Online — Free Image Compressor