Base64 to WebP Converter

Save Base64-encoded WebP images as files, or turn Base64 PNG and JPEG data into WebP, a modern format that is usually smaller at similar visual quality.

Runs entirely in your browser. Nothing is uploaded.

How to use

  1. Paste a Base64 string or a data:image/webp;base64 URI. Any other image format works too.
  2. Check the preview, the detected format and the decoded size.
  3. Keep WebP as the download format to convert, or choose Original to save the bytes exactly as decoded.
  4. Download the .webp file and compare its size with the source.

Recognising WebP data

WebP is stored in a RIFF container, the same wrapper used by WAV audio. The file starts with the ASCII text RIFF, so its Base64 begins with UklGR; a few bytes later the marker WEBP confirms that the container holds an image rather than sound. Inside, the image is either lossy (VP8), lossless (VP8L) or an extended file (VP8X) that adds transparency, animation or metadata. The MIME type is image/webp.

Why convert to WebP

According to Google's measurements, lossy WebP files are roughly 25 to 34 percent smaller than JPEGs of comparable quality, and lossless WebP is about 26 percent smaller than PNG. Unlike JPEG, WebP keeps an alpha channel, so transparent logos and stickers convert cleanly. Every current major browser displays WebP.

Smaller files matter twice when images are inlined: a lighter image also means a shorter Base64 string in your HTML, CSS or JSON. After converting, you can encode the new file again with WebP to Base64.

The result is not always smaller. Tiny icons, already well-compressed photos and flat graphics with few colours sometimes come out larger, in which case PNG or JPG is the better choice. Converting here is also a quick way to test how much a particular image would gain before you change a build pipeline: paste a Base64 PNG or JPEG, download the WebP and compare the two sizes.

Converting with Pillow

For batch jobs on a server, the same conversion takes a few lines of Python with the Pillow library:

import base64, io
from PIL import Image

img = Image.open(io.BytesIO(base64.b64decode(b64_string)))
img.save('output.webp', 'WEBP', quality=80)

Frequently asked questions

Does WebP keep transparency?

Yes. WebP supports a full alpha channel in both lossy and lossless mode, so transparent areas stay transparent after conversion.

Can I keep an animated WebP?

Download it as Original to keep every frame. Converting goes through a canvas, which captures a single still frame.

Is the WebP output always smaller than the input?

No. Large photos and screenshots usually shrink, but small or heavily optimised images can grow. Compare the decoded size shown by the tool with the size of the downloaded file.

Some software will not open my WebP file. What can I do?

Older image viewers and office programs may lack WebP support. Paste the same Base64 and download it as PNG or JPG instead.