File Formats
WebP Explained: How It Works, Browser Support and When to Avoid It
WebP is an image format from Google that can replace both JPG and PNG on the web: it has a lossy mode for photos, a lossless mode for graphics, transparency and animation. It is supported by every current major browser, yet a WebP file can still cause trouble once it leaves the browser. This guide covers how the format works, what the size savings actually are, and when to convert to something else.
Intera Tools5 min read
Key points
- WebP has a lossy mode based on the VP8 video codec and a separate lossless mode. Both support transparency, and both can be animated.
- Google's own studies report lossy WebP 25–34% smaller than JPEG at equal SSIM quality, and lossless WebP 26% smaller than PNG. Your images will vary.
- All current versions of Chrome, Edge, Firefox, Opera and Safari can display WebP. Creating WebP files in the browser is less universal: Safari has not supported canvas WebP encoding.
- WebP is a web delivery format. For email attachments, print shops, office software and strict upload forms, JPG or PNG is safer.
What WebP is
Google introduced WebP in 2010 as a smaller alternative to JPEG for web pages, and later added lossless compression, transparency and animation. A WebP file is a container (RIFF) that holds either lossy or lossless image data, optionally with an alpha channel and multiple frames. The extension is .webp and the MIME type is image/webp. Images can be up to 16,383 × 16,383 pixels.
Lossy mode
Lossy WebP uses the same method as a key frame in the VP8 video codec. The image is split into blocks. Each block is predicted from pixels that were already decoded next to it, and only the difference between the prediction and the real pixels is stored. That difference is transformed, quantized (the step where detail is discarded) and entropy-coded. Compared with JPEG, the block prediction and better entropy coding are where most of the savings come from.
One limitation is worth knowing: lossy WebP always stores color at half resolution horizontally and vertically (4:2:0 chroma subsampling). Photos hide this well, but small red text, thin colored lines and sharp color edges in screenshots can look slightly blurred or bleed. JPEG encoders can keep full color resolution, and PNG or lossless WebP never subsample.
Lossless mode
Lossless WebP is a separate codec. Before compressing, it transforms the image: it predicts pixels from their neighbors, decorrelates the color channels, builds a palette when there are few colors, and keeps a cache of recently used colors. Repeated areas are stored as references to earlier pixels. The decoded image is identical to the original, just like PNG.
Transparency and animation
Both modes support an 8-bit alpha channel. The lossy mode can pair lossy color with a separately compressed alpha channel, which is something neither JPEG (no alpha) nor PNG (lossless only) can do. Animated WebP is an alternative to GIF with full color and alpha. Note that most tools, including Intera Tools, read only the first frame of an animation.
How much smaller is WebP?
| Comparison | Google's reported result |
|---|---|
| Lossy WebP vs JPEG | 25–34% smaller at equal SSIM quality |
| Lossless WebP vs PNG | 26% smaller |
| Cost of adding transparency to lossless WebP | about 22% more bytes |
| Lossy WebP with transparency vs PNG | typically about 3× smaller |
These are averages from Google's test sets, measured with Google's own encoder. Two things change the result for your files. First, image content: a detailed photo and a flat illustration behave very differently. Second, the encoder: browsers use their built-in encoders when a web tool creates WebP, and they don't expose every tuning option that a command-line encoder has. A WebP saved at "quality 80" is also not the same as a JPG at quality 80, because each format uses its own scale.
The reliable way to know is to test your own image. Image Format Comparison encodes one image as JPG, PNG, PNG-8 and WebP in your browser, shows each file size next to the original, tells you whether transparency survived, and lets you compare the results side by side.
ToolImage Format ComparisonEncode one image as JPG, PNG, PNG-8 and WebP and compare size and quality side by side, without uploading it.Open toolBrowser support today
Displaying WebP is no longer a problem in browsers. MDN lists support in all current versions of Chrome, Edge, Firefox, Opera and Safari. The late arrivals were Firefox (version 65, 2019) and Safari (version 14, 2020). On a Mac, Safari 14 and 15 only displayed WebP on macOS Big Sur or later, so a very old Mac can still show a broken image. Can I use estimates global support at about 97%.
Creating WebP files in a browser is a different matter. Web tools like Intera Tools draw the image onto a canvas and ask the browser to encode it. Chrome and Edge can encode WebP this way, and Firefox has supported it since version 96. Safari has not: when asked for WebP, it returns a PNG instead. Intera Tools checks this before you start, and in browsers that can't encode WebP the WebP options can't be used and show the message "This browser can't create WebP files." Opening and converting WebP files to JPG or PNG still works in Safari.
When not to use WebP
- Sending files to people. The recipient might open the attachment in older desktop software, an office suite or a photo app that doesn't recognize
.webp. JPG opens everywhere. - Upload forms with a fixed list of extensions. Job portals, government sites, print services and many marketplaces accept only JPG or PNG, and reject or silently mangle WebP.
- Print and professional editing. WebP is 8-bit RGB only, with no CMYK and no high bit depth. Print shops usually ask for JPG, TIFF or PDF.
- Small colored text and UI screenshots in lossy mode. Chroma subsampling can soften colored detail. Use PNG or lossless WebP instead.
- Repeated editing. Each lossy save loses some detail, just like JPG. Keep an original and export WebP as the last step.
Converting WebP
To turn a downloaded WebP into something every app can open, use WebP to JPG. If the WebP has transparency, the transparent areas are filled with the color set under Background for transparent areas (white by default). To keep transparency, or to avoid another lossy step for a graphic, use Convert Image with PNG as the target. PNG is lossless, so nothing further is lost, but the file will usually be larger than the WebP.
Going the other way, Convert Image and Compress Image (with Convert to WebP) create WebP in browsers that support it. Converting a lossy WebP to JPG is a second lossy step. Detail already discarded by WebP can't be recovered, so use a high Quality setting (around 90) to avoid adding visible JPG artifacts on top. In all cases, re-encoding drops metadata such as EXIF and GPS location.
5WorkflowWeb Image OptimizationPreparing images for a website? The web image workflow limits the width, converts to WebP (or JPG as a fallback), keeps the original when the result would be larger, and reports the total savings.Open workflowQuestions
Is WebP always smaller than JPG?
No. Google's studies report 25–34% smaller files on average at equal quality, but results depend on the image and the encoder. Some images come out the same size or larger. Test with your own image before converting a whole library.
Why can't I select WebP as the output format in Safari?
Safari can display WebP, but its canvas can't encode WebP files. When a page asks for WebP, Safari returns a PNG. Intera Tools detects this and disables the option. Use Chrome, Edge or Firefox to create WebP files.
Does converting WebP to JPG lose quality?
If the WebP is lossy, converting to JPG is a second lossy compression, so a little more detail is lost. At a high quality setting the difference is usually hard to see. Converting to PNG adds no further loss.
Can WebP keep a transparent background?
Yes. Both lossy and lossless WebP support an alpha channel. Converting a transparent PNG to WebP keeps the transparency, while converting to JPG fills it with a solid color.
Sources
Related tools
Related guides
- Comparisons
JPG vs PNG vs WebP: real file sizes, measured
Format advice is usually given in round percentages. Here are actual numbers: the same eight images saved as JPG, PNG, 256-color PNG and WebP with the browser encoders Intera Tools uses, plus what the results mean for photos, screenshots and logos.
Read guide - File Formats
PNG Transparency Explained: Alpha Channels, JPG Backgrounds and Edge Halos
A transparent PNG is not an image with a missing background. Every pixel carries an extra value that says how opaque it is, and that value is what makes soft edges, shadows and see-through logos possible. This guide explains how the different kinds of PNG transparency work, what happens when a format without transparency gets involved, and how to keep edges clean when you resize, compress or convert.
Read guide - Comparisons
Light, Balanced or Strong? Image compression levels tested
Compress Image offers three levels. To show what they actually do, we ran the same five large photos through each level on the live site, measured every file and compared each result with its original using SSIM, a standard image-similarity score.
Read guide