Menu

JPG to WebP

Purpose: Convert JPG images to modern WebP format for smaller file sizes and faster page loading. Runs entirely in your browser.

JPG to WebP: How It Works

WebP produces files 25–35% smaller than JPEG at equivalent visual quality, and it supports transparency and animation, which JPEG does not. Browser support has been universal for years, which makes this one of the least controversial optimisations available.

What you gain

JPEGWebP
Lossy compressionYesYes, more efficient
Lossless modeNoYes
TransparencyNoYes, with lossy compression
AnimationNoYes
Typical 800 KB photo800 KB≈ 550 KB

Lossy transparency is the underrated feature. Previously, an image needing transparency had to be PNG and therefore large. WebP removes that trade-off entirely — a transparent product photograph can be a fraction of its PNG size.

Compression is not free a second time

Converting an existing JPEG to WebP re-encodes already-lossy data. The result is smaller, and it inherits every artefact the JPEG already had, plus a small amount more. Where you have the original — a RAW file, a PNG export, an uncompressed master — encode WebP from that instead. The difference is visible in gradients and skies.

Where the JPEG is all you have, converting is still worthwhile: the size saving usually outweighs the marginal additional loss.

Serving it correctly

Use the picture element so browsers that cannot handle WebP receive a fallback:

<picture>
  <source srcset="photo.avif" type="image/avif">
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.jpg" alt="Description" width="800" height="600">
</picture>

The browser takes the first format it supports. Always include width and height so the layout does not shift as images load — this is one of the largest contributors to a poor Cumulative Layout Shift score.

Where WebP is still awkward

What about AVIF

AVIF is typically 30–50% smaller again than WebP at similar quality, with better handling of gradients and high dynamic range. Encoding is slower, which matters at build time but not at serve time. The sensible approach today is to offer AVIF first, WebP second and JPEG as the fallback — three files generated once, and every visitor gets the best format their browser supports.

Conversion here runs in your browser; nothing is uploaded.

Frequently Asked Questions

How much smaller is WebP than JPEG?
Typically 25–35% at equivalent visual quality, and more for images with flat areas or transparency. The saving is larger still if you encode from an original rather than from an existing JPEG.
Do all browsers support WebP?
All current browsers do, and have for several years. A picture element with a JPEG fallback covers any remaining older clients at no cost.
Does converting an existing JPEG lose more quality?
A little, because you are re-encoding already-lossy data and inheriting its artefacts. Encode from an original where you have one. Where the JPEG is all you have, the size saving usually justifies the marginal loss.
Can WebP replace PNG as well?
Often, yes. WebP has a lossless mode and supports transparency with lossy compression, so transparent images can be far smaller than the PNG equivalent. Keep PNG where absolute compatibility is required.
Should I use AVIF instead?
AVIF is typically 30–50% smaller again with better gradient handling, at the cost of slower encoding. Offering AVIF first, WebP second and JPEG as fallback gives every visitor the best format their browser supports.
Why should I avoid WebP in email?
Email client support remains inconsistent, and an image that fails to render in an email is worse than a slightly larger one that works everywhere. Use JPEG or PNG for email and social preview images.

Related Image Tools

Browse all Image tools →