Base64 to WebP
Paste a Base64 string or a data URI and download it as a WebP image. Everything runs in your browser — nothing is uploaded.
How to convert Base64 to a WebP
Paste your data into the box above. You can give it a full data URI — a string of the form data:image/webp;base64,UklGR… — or just the raw Base64 payload without the data: prefix. The tool decodes the bytes locally and confirms it's a WebP by reading the file's magic bytes: a real WebP begins with RIFF (0x52 0x49 0x46 0x46), a 4-byte length, then WEBP (0x57 0x45 0x42 0x50) at offset 8. A live preview appears immediately. When it looks right, click Download WebP to save the file as image.webp.
Why isn't my WebP showing?
If the preview stays empty or you get an error, one of these is usually the cause:
- The string is truncated. A partial copy cuts off the end of the image, so the bytes don't form a complete, valid file.
- It's URL-safe Base64 without padding. That's handled automatically — the tool converts
-and_back to+and/and re-adds the missing=padding before decoding. - The data isn't actually a WebP. A real WebP carries the
RIFF…WEBPcontainer signature. Base64 of a PNG, a PDF, or some other blob will decode into bytes, but won't carry that signature. - A copy/paste added stray characters. Line breaks and spaces are stripped automatically, but quotes, HTML entities, or a stray prefix can corrupt the payload.
Tip: WebP data URIs render in all modern browsers, so a decoded WebP previews here just like a PNG or JPEG.
Decoding a data URI
You don't need to strip anything by hand. Paste the whole data URI including the data:image/webp;base64, prefix and the tool removes it automatically before decoding. Pasting just the raw Base64 payload works too — both paths produce the same downloadable WebP.
Is this private?
Yes. The decoding happens entirely client-side in JavaScript. The Base64 you paste is decoded into bytes in the browser and turned into an object URL locally — it is never sent to a server. You can confirm this by opening DevTools → Network: pasting and decoding fires no request.
Frequently asked questions
How do I convert Base64 to a WebP?
Paste a full data URI (data:image/webp;base64,UklGR…) or just the raw Base64 payload into the box above. It decodes the bytes locally, checks the RIFF…WEBP container signature, shows a preview, and lets you download the result as a WebP.
Why isn't my WebP showing?
Usually the string is truncated, it isn't actually a WebP, or a copy/paste introduced stray characters. A valid WebP starts with RIFF and carries WEBP at offset 8. If the bytes don't form a recognizable image, the preview will fail to load.
Can I decode a data:image/webp;base64 URI?
Yes. Paste the whole data URI including the data:image/webp;base64, prefix and it's stripped automatically before decoding. Pasting just the raw Base64 payload works too.
How do I convert a WebP TO Base64?
Use the WebP to Base64 tool to go the other way — drop a WebP and get a data URI you can paste into HTML or CSS.
Need to encode a WebP?
The main base64.dev tool handles text, files, and URL-safe mode with auto-detect.
Open base64.dev →