Getting Started

Image enthusiasts should use one of the many software products that support WebP.


We provide in the libwebp codec distribution a reference implementation for the encoder and decoder applications, cwebp and dwebp respectively, to showcase the available functionalities of WebP. These files can be downloaded from the downloads repository or can be built from source. They reside in the examples/ directory.

The libwebp codec includes an extensive encoder and decoder API. Please consult the appropriate documentation if you'd like to add support for WebP to your application or browser.

Using cwebp to Convert Images to the WebP Format

Use cwebp on the command line to convert PNG or JPEG image files to WebP format. You can convert a PNG image file to a WebP image with a quality range of 80 with the command:

cwebp -q 80 image.png -o image.webp

Consult the cwebp documentation for a description of the encoder, its standard and advanced options.

Using dwebp to Convert Images from the WebP Format

Use dwebp on the command line to convert WebP image files to the PNG or PPM format. You can convert a WebP image file, say image.webp to a PNG image with the command:

dwebp image.webp -o image.png

Consult the dwebp documentation for a description of the decoder and its command-line options.

Viewing your Images Natively

WebP is a new image format and is natively supported in Google Chrome, Opera, and many other applications and libraries.

API for the WebP Codec

The WebP team has provided an extensive API to allow developers to add support to their applications, including browsers, image editing tools as well as native applications.

Consult the API documentation for a description of libwebp application programming interface.