What Is a WebP File? The Complete Answer

What is a WebP file? Google's web image format that beats JPEG and PNG on size, with the real numbers and when it backfires instead.

By Mike Wiberg · · 14 min read

What is a WebP file? It is Google's image container for the web, one format that holds either lossy or lossless compressed pixel data, plus optional transparency and animation. Lossy WebP typically runs 25 to 35% smaller than a JPEG at the same visual quality, and lossless WebP runs about 26% smaller than PNG.

That is why the picture you save off a website so often lands on your drive as .webp instead of .jpg, whether you asked for it or not. I run this format through the compression engine behind imagecompressor.tools, and the site's own demo makes the savings concrete: a 497 KB JPG becomes a 214 KB WebP at quality 80, 56.9% smaller, with no visible difference at normal zoom. This is the full explainer on the WebP file format, the deep dive linked from the WebP and AVIF hub: how the compression actually works, what it can do that JPEG and PNG cannot, and where it quietly comes back bigger instead.

What Is a WebP File?

A WebP file is a single container format, not two separate formats bolted together under one extension. Inside, it holds either VP8 image data, the lossy mode, or VP8L image data, the lossless mode, wrapped in a RIFF container, the same generic file-wrapping scheme used by WAV audio and AVI video. Google released WebP as open source, describing it as providing "superior lossless and lossy compression for images on the web" (Google Developers, WebP). Open source means no browser or business pays a license fee to use it, which is a real reason it spread across every major browser within a few years instead of stalling the way proprietary formats often do.

WebP is not a JPEG replacement bolted to a separate PNG replacement. One extension, .webp, covers photographic lossy compression, flat-graphic lossless compression, transparency, and animation, so a browser needs to ship only one modern codec instead of three older ones living side by side. That consolidation is the entire reason the WebP file format exists: fewer bytes over the wire for the same picture, decided once at Google's own infrastructure scale, then handed to the rest of the web for free. The RIFF wrapper itself is unglamorous but useful: it is just a labeled sequence of chunks, so adding a new chunk type for animation frames later did not require inventing a whole new file format from scratch.

How Does WebP Compression Work?

WebP runs one of two entirely different compression methods depending on which mode a file was saved in, and the .webp extension alone never tells you which one you are looking at without opening it.

Lossy WebP: predictive coding from VP8

Lossy WebP borrows predictive coding from the VP8 video codec: the encoder guesses each block of pixels from the blocks it already encoded nearby, then stores only the difference between the guess and the real data. Photographs are locally predictable, colors and edges rarely jump without warning, so those differences compress hard, which is where the 25 to 35% saving over JPEG comes from. Color is stored as 8-bit Y'CbCr 4:2:0, the same scheme video uses, keeping full brightness detail while subsampling color more aggressively than a typical JPEG encoder does (Google WebP FAQ). The degree of lossy compression is adjustable on a slider, not fixed, so a lower setting buys a smaller file at the cost of visible softness, and quality 80 is the point most tools, including this one, treat as visually lossless for an ordinary photograph.

Lossless WebP: rebuilding pixels exactly

Lossless WebP works the opposite way. It rebuilds each pixel from image fragments already seen earlier in the file, a substitution method rather than a predictive one, keeping full RGBA color with no subsampling at all. That is why it reproduces every pixel exactly, like PNG, while still landing about 26% smaller. Both modes sit inside the same RIFF wrapper, VP8 data for lossy and VP8L data for lossless, and animated files add ANIM and ANMF chunks on top to describe the sequence and its individual frames (MDN, Image file types). Google's own reference implementation, the libwebp library, ships the cwebp and dwebp command line tools to encode and decode either mode.

Does a WebP File Support Transparency and Animation?

Yes to both, and in both compression modes, which is more than JPEG or PNG manage on their own. JPEG has no transparency and no animation, full stop. PNG has transparency but is lossless only, so a transparent photo saved as PNG runs far larger than it needs to for how little detail actually changes between pixels.

A lossless WebP with a full alpha channel costs about 22% more bytes than the same image without transparency, according to Google's own documentation, still cheaper in most cases than the equivalent PNG. A lossy WebP with transparency typically lands at about a third the size of the equivalent transparent PNG, useful for graphics and icons that do not need pixel-perfect edges to look right. Animation lives in the same container too, built from a sequence of VP8 or VP8L frames, and can carry lossy frames, lossless frames, or transparency inside the animation itself, something GIF has never managed at any file size, however large you let it get. An animated WebP frequently ships smaller than the equivalent GIF or APNG covering the same clip, without forcing the same all-or-nothing choice between lossy and lossless that older animation formats never offered.

How Much Smaller Is a WebP File Than JPEG or PNG?

Lossy WebP typically runs 25 to 35% smaller than a JPEG of the same visual quality, and lossless WebP runs about 26% smaller than PNG; a WebP saved with lossy transparency runs about a third the size of an equivalent PNG.

Comparison Typical result
Lossy WebP vs JPEG, same visual quality 25 to 35% smaller
Lossless WebP vs PNG About 26% smaller
Lossy WebP with transparency vs PNG About a third the size

The WebP compressor on this site puts those exact numbers on your own file instead of a percentage range you have to take on faith. Here is the number that took an actual test rather than a rule of thumb: the homepage demo takes a 497 KB JPG and returns a 214 KB WebP at quality 80, the default treated as visually lossless for a photograph. That is 283 KB gone, 56.9% smaller, with nothing visibly different at normal zoom.

Same photo, JPG vs WebP Homepage demo file, quality 80 Original JPG 497 KB WebP, quality 80 214 KB Measured with imagecompressor.tools. 56.9% smaller, same visual quality.
File Size Change
Original JPG 497 KB baseline
WebP, quality 80 214 KB 56.9% smaller

The spread in the first table tracks the source file, not a flaw in the format. An already-compressed JPEG has little redundancy left to squeeze, while a large, high-quality original gives the encoder more room to work, which is exactly why testing your own file beats memorizing a single percentage.

Are WebP Files Safe to Open?

Yes. A WebP file is image data inside a container, the same category as a JPEG or PNG, not an executable program, and opening one cannot run code on your machine any more than opening a photo already does. The "is this a virus" worry usually comes from unfamiliarity with an unfamiliar extension rather than anything the format itself does: a .webp file behaves exactly like any other image once your browser or operating system decodes it, and the container holds pixel data and chunk headers, nothing that executes.

Where people actually run into trouble is software, not the file. An older program that has never been updated to recognize .webp will refuse to open it, or show a garbled result, which reads as broken rather than unsafe. The fix is a current browser, an updated app, or converting the file to a format the old software already understands, not scanning it for malware it structurally cannot contain, since there is no code path inside the container for anything to execute from in the first place.

Why Do People Dislike WebP Files?

Mostly because of what happens after the save, not the format itself. A picture saved off a webpage as .webp will not open in software that expects .jpg, will not attach cleanly to some upload forms, and will not drop into an older office document without a conversion step first, so the complaint is really about compatibility friction landing on the reader at an inconvenient moment.

Some of the frustration is also about consent. WebP usually is not what anyone asked to download; it is what the site served by default to save its own bandwidth, and the person saving the file only notices the extension once something downstream refuses it. None of that is a flaw in the compression itself. Lossy WebP still beats JPEG on size at the same quality, and lossless WebP still beats PNG; the dislike is a workflow problem with a one-step fix, not a reason to avoid the format on your own site.

Where Does WebP Browser and App Support Break Down?

Every current browser reads WebP natively, so the real gap is older desktop software and one hard technical ceiling rather than the modern web. A WebP file cannot exceed 16383 by 16383 pixels in either dimension, since the format allocates 14 bits to each axis, a limit that is rarely relevant outside stitched panoramas.

Browser support arrived years apart. Chrome added it at version 32, Edge at 18, Firefox at 65, and Safari added full desktop support at 16.0 with partial support back to 14, and iOS Safari has carried it since version 14 as well (caniuse, WebP). Desktop image viewers lagged further behind. Windows Paint and the Photos app only gained native WebP support in 2023, years after GIMP added it in 2018, Paint.NET in 2019, and IrfanView all the way back in 2011 (PCWorld, Convert WebP to JPG or PNG). Older machines and locked-down corporate builds can still lack support entirely, and plenty of upload forms and office software reject the format outright regardless of the operating system underneath.

Browser or app Native WebP support since
Chrome Version 32
Edge Version 18
Firefox Version 65
Safari (desktop) Full support 16.0, partial from 14
iOS Safari Version 14
Windows Paint / Photos 2023
GIMP 2018
Paint.NET 2019
IrfanView 2011

How Do You Open or Convert a WebP File?

Dragging a .webp file into any current browser tab opens it with no extra software, on any operating system.

Opening a WebP file on Windows or Mac

On a current Windows install, Paint and the Photos app open WebP directly, no extension needed. On an older Windows machine, or on a Mac, drop the file into Chrome, Edge, Firefox, or Safari instead, since all four have supported WebP natively for years, well before Windows added support of its own.

Opening a WebP file on iPhone or Android

Phones use the same browser engines as their desktop counterparts, so if Chrome or Safari opens a WebP file on your computer, the mobile versions open it the same way, no separate app required. Saving an image out of a mobile browser keeps whatever format the site sent, exactly like a desktop download, so a photo saved on a phone can land as .webp too, and the fix is the same conversion step either way.

Converting a WebP file to JPG, PNG, or AVIF

Converting out of WebP is the more common need in practice, usually because a form or a piece of software refuses the format outright. Reading a WebP and writing a JPG, PNG, or AVIF is a straightforward format change: quality set to a sensible default, EXIF metadata stripped automatically rather than something you go looking for. Drop the file into a WebP converter and pick the output format directly; there is no separate tool to hunt down for either direction, and batches of files convert the same way one at a time would, just faster.

Questions

What Does WebP Stand For?

Nothing official. Unlike JPEG, which spells out Joint Photographic Experts Group, WebP is Google's name for the format, not an abbreviation with documented words behind each letter. Treat it as a brand name for the container rather than an acronym waiting to be decoded, the same way PNG's own backronym debate never changed what the format actually does on disk.

What Will Open a WebP File?

Any current browser: Chrome, Edge, Firefox, and Safari all decode WebP natively with no plugin required. On Windows, Paint and the Photos app open it directly since 2023. On older software that predates WebP support, GIMP, Paint.NET, and IrfanView have all handled it for years, or you can convert the file to JPG or PNG first and skip the compatibility question entirely.

Is WebP Better Than JPEG?

For file size at equal visual quality, yes: lossy WebP typically runs 25 to 35% smaller than a comparable JPEG, and it adds transparency and animation that JPEG cannot do at all. The tradeoff is compatibility, since some older software and upload forms still expect a .jpg file specifically. For a modern website, WebP is the better default; for maximum compatibility with old tools, JPEG still wins the argument.

How Do I Convert a JPEG to a WebP File, or Back?

Reading one format and writing another is the same operation in either direction: drop the file into a WebP converter, pick JPG, PNG, WebP, or AVIF as the output, and download the result. There is no separate converter needed for either direction, and the default quality setting is tuned to look the same as the original at normal zoom, on either a phone screen or a desktop monitor.

Why Did My Downloaded Image Save as .webp Instead of .jpg?

Because the website sent WebP to your browser, and saving a picture keeps whatever bytes actually arrived. Sites detect that modern browsers accept WebP and serve it by default to cut their own bandwidth bill, so a JPG version of that exact image may not even exist on the server. Converting the saved file afterward takes seconds and needs no special software.

Is a WebP File Always Smaller Than JPEG?

No, and this is the exception worth remembering. WebP usually wins by 25 to 35%, but converting an already-lossy JPEG into lossless WebP, or a flat-color PNG into lossy WebP, can produce a file larger than the original. The format is a strong default, not a guarantee, which is why testing your own file beats trusting a rule of thumb every single time. Two compression modes, real transparency, real animation: one format that removed the need to pick between JPEG and PNG for most web images. The number that matters is your own file's. [Drop a JPG or PNG into the WebP compressor](/compress-webp) and compare the before and after byte counts yourself.