Skip to main content

File format

What is a WebP file?

Checked against the sources on Sizes measured

In one paragraph

A WebP file is an image in a RIFF container that holds either lossy data (VP8 intra-frame coding, the same family as the VP8 video codec) or lossless data (WebP's own VP8L coding), optionally with transparency, colour profile, metadata and animation. The format is documented in RFC 9649, published by the IETF in November 2024, which also registers the image/webp media type.

WebP at a glance

WebP at a glance
PropertyWhat the source saysSource
Media typeimage/webp, registered by RFC 9649.RFC 9649IANA
How the file startsWith a RIFF header: the bytes "RIFF", a 32-bit size, then the FourCC "WEBP".RFC 9649
Lossy codingA 'VP8 ' chunk holding VP8 intra-frame (key frame) data.RFC 9649
Lossless codingA 'VP8L' chunk holding the WebP lossless bitstream.RFC 9649
Extended featuresA 'VP8X' chunk flags the optional extras: 'ICCP' colour profile, 'ALPH' alpha plane for lossy images, 'ANIM'/'ANMF' animation, 'EXIF' and 'XMP ' metadata.RFC 9649
Largest imageA lossless bitstream stores width and height in 14 bits, so at most 16384 x 16384. The extended canvas uses 24-bit fields, and width times height must be at most 2^32 - 1.RFC 9649
Browser supportMDN lists all versions of Chrome, Edge, Firefox, Opera and Safari, and notes that Safari on macOS needs Safari 14 or later on macOS Big Sur (11) or later (MDN read on 13 November 2026).MDN
Each row was checked against the linked source on 13 November 2026.

Two codecs under one extension

The thing most people get wrong about WebP is assuming it is always lossy. A .webp file is a container, and the chunk inside decides what you have. A 'VP8 ' chunk means lossy coding: block-based prediction and transform coding, close in spirit to how a video codec compresses a single key frame. A 'VP8L' chunk means the separate lossless coding, which uses transforms such as predicting pixels from their neighbours, a colour cache and backward references to repeated data, and decodes to exactly the stored pixels.

Transparency works differently in the two. A lossless image simply carries alpha with every pixel. A lossy image keeps its colour in the VP8 data and its transparency in a separate 'ALPH' chunk, announced by the extended 'VP8X' header. That is why a lossy WebP can have a clean transparent background, which JPEG cannot.

You can see which kind a file is without any image software: open it in a hex viewer and look for the four-letter chunk names after the first twelve bytes. The measured example below lists the chunks the browser actually wrote for each sample.

How to open a WebP file

Any current browser opens WebP, so dragging the file into a browser tab is the quickest way to look at it. Trouble usually starts one step later, when the image has to go into software that predates WebP: an older photo editor, a print shop's upload page, a form that accepts only JPG or PNG.

For those, convert it. A WebP with transparency should become a PNG, which keeps the alpha channel; a photo with no transparency can become a JPG. The WebP to PNG / JPG Converter on AltFTool does this in the browser, and it is also the fix when a site saved an image you downloaded as .webp although you expected a .jpg.

What a quality of 1.0 does in the browser

Web pages that create WebP files, AltFTool's Image Converter among them, call the browser's canvas encoder with a quality between 0 and 1. In the Chromium build measured here, qualities 0.82 and 0.90 both produced a lossy 'VP8 ' chunk, and quality 1.0 switched to the lossless 'VP8L' coding: the photo sample came back pixel-identical, and the file was many times larger than the lossy versions.

So a "100%" WebP from that browser is not a slightly better lossy file; it is a different codec with a different size. If you want the smallest file that looks right, stay below 1.0. If you need an exact copy, for example a screenshot you will crop again later, 1.0 is the setting that gives you one.

When WebP is the right format

When WebP is the right format
Your imageUse WebP?Why
Photo for a web pageYesLossy WebP was smaller than JPEG at similar fidelity in this page's measurement.
Graphic or logo with transparency for the webYesLossy colour plus an alpha plane gives small files with clean edges.
Screenshot that must stay exactYes, at quality 1.0That setting switches to lossless coding in the browser measured here.
File for an old editor or a print shopNoConvert to PNG or JPG; older software may not read WebP.
Upload form that lists only JPG/PNGNoThe form decides; convert before uploading.
Short animationYesANIM/ANMF chunks support looping animation with transparency.

Measured example

WebP files written by the browser's canvas encoder
FileBytesSizeFidelity to the original
Photo sample, quality 0.82 (lossy)71,57469.9 KB36.5 dB
Photo sample, quality 1.0661,674646 KBidentical pixels
Graphic sample, quality 0.82 (lossy + alpha)7,6947.5 KB38.3 dB
Photo sample as JPEG, quality 0.82 (for scale)86,53184.5 KB36.1 dB
13 November 2026, Chromium 153.0.8010.12. Fidelity: PSNR against the original (higher is closer).

At quality 0.82 the photo became 69.9 KB with chunks VP8X, ICCP, VP8 : lossy VP8 data, plus the extended header and a colour profile the browser adds. At quality 1.0 the chunk changed to VP8L, the decoded pixels matched the original exactly, and the file grew to 646.2 KB.

The graphic at quality 0.82 came out at 7.5 KB and carries an ALPH chunk, so its transparent background survived lossy coding. For scale, the JPEG of the photo at the same 0.82 setting was 84.5 KB at 36.1 dB, against WebP's 36.5 dB.

Questions

Is WebP lossy or lossless?

Either. A WebP file holds lossy VP8 data or lossless VP8L data, and the encoder decides which. In the browser measured on this page, canvas quality 1.0 produced lossless files, while 0.82 and 0.90 produced lossy ones.

Can WebP have transparency?

Yes, in both modes. Lossless WebP stores alpha with each pixel; lossy WebP stores it in a separate ALPH chunk. This page's graphic sample kept its transparent background at quality 0.82.

Why won't my WebP open in an old program?

Software written before WebP became common may not include a decoder. Open the file in a browser to check it is intact, then convert it to PNG (keeps transparency) or JPG for that program.

What is the largest image WebP can store?

RFC 9649 limits a lossless bitstream to 16384 x 16384 pixels, because width and height are stored in 14 bits. The extended canvas header uses 24-bit fields but requires width times height to be at most 2^32 - 1.

Can WebP be animated?

Yes. An animated WebP uses an ANIM chunk for global settings such as loop count and one ANMF chunk per frame, inside the extended VP8X layout.

Sources

  1. IETF, November 2024RFC 9649: WebP Image FormatInformational RFC · opened 13 November 2026
  2. IANAMedia Types registry, image/* (apng, avif, heic, heif, jpeg, png, webp)Registry · opened 13 November 2026
  3. MDN Web Docs, 5 November 2026Image file type and format guideReference guide (page last modified 5 November 2026) · opened 13 November 2026

Working with a WebP file?

Turn a WebP into a PNG or JPG that older software opens. The WebP to PNG / JPG Converter runs in your browser tab, with no account.