base64 | decode | webp

> base64 | decode | WebP <

// Decode Base64 strings and data URIs back to WebP images - instant preview, one-click .webp download

// PASTE A WEBP data: URI HERE

Paste a full data:image/webp;base64, URI or just the raw Base64 payload. Raw WebP usually starts with UklGR, the Base64 form of the RIFF file signature.

WebP data URI (1x1 sample)

data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA

Raw WebP Base64 payload

UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA

// Tip: if a copied value is truncated by DevTools or a log viewer, the preview will fail. Copy from the original HTML, CSS, JSON, or API response when possible.

0 chars
🖼️

Decoded WebP will appear here

[WEBP]

Format Detection

Paste a full data:image/webp URI or a raw Base64 payload that starts with UklGR. The preview uses the browser's native WebP renderer.

[PRIVATE]

Local Decode

The Base64 payload is decoded in your browser. No upload, no server processing, and no logging of image bytes.

[DOWNLOAD]

Save as .webp

Preview the decoded result and download the original WebP payload with the correct .webp extension.

// ABOUT BASE64 TO WEBP

What This Tool Accepts

  • >Data URI: data:image/webp;base64,UklGR...
  • >Raw WebP Base64 payload (starts with UklGR)
  • >Static WebP images
  • >Animated WebP images
  • >Lossy VP8 and lossless VP8L WebP payloads
  • >Base64 with embedded whitespace or line wraps

Common Use Cases

  • >Recovering a WebP image from a JSON API response
  • >Previewing a data:image/webp URI from CSS or HTML
  • >Saving a WebP thumbnail embedded in a database TEXT column
  • >Debugging inline WebP assets in email or single-file HTML
  • >Checking whether a raw Base64 payload is valid WebP
  • >Extracting an animated WebP from a copied data URI

How Base64 -> WebP Decoding Works

The decoder strips any data URI prefix, removes whitespace, and lets the browser render the decoded payload as image/webp. WebP files are RIFF containers whose Base64 payload starts with UklGR, so raw WebP strings can be detected without a MIME prefix.

Example WebP Data URI:

data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA

Performance & Compatibility

  • >Uses native browser image decoding
  • >Works with static and animated WebP in modern browsers
  • >Handles large payloads up to browser memory limits
  • >No third-party JavaScript libraries required
  • >Downloads directly from the decoded data URI
  • >Works offline after the page has loaded

// HOW TO DECODE BASE64 TO WEBP

01

Step 1: Paste

Paste a WebP data URI or raw UklGR... Base64 payload

02

Step 2: Decode

Click [DECODE] to render the WebP preview

03

Step 3: Inspect

Check dimensions, format, and approximate size

04

Step 4: Download

Click [DOWNLOAD .webp] to save the decoded image

// CODE EXAMPLES - BASE64 TO WEBP

JavaScript (Browser)

const src = 'data:image/webp;base64,UklGR...';
const img = new Image();
img.src = src;
document.body.appendChild(img);

A full WebP data URI can be assigned directly to an image element.

Node.js

const fs = require('fs');
const b64 = 'UklGRiIAAABXRUJQVlA4...';
fs.writeFileSync('out.webp', Buffer.from(b64, 'base64'));

Decode raw WebP Base64 text and write the original .webp bytes.

Python

import base64
b64 = 'UklGRiIAAABXRUJQVlA4...'
open('out.webp', 'wb').write(base64.b64decode(b64))

Python's standard library is enough to restore a WebP file from Base64.

Shell (macOS / Linux)

printf '%s' 'UklGRiIAAABXRUJQVlA4...' | base64 -d > out.webp

Decode a raw payload from stdin and save it as a WebP file.

// FAQ - BASE64 TO WEBP

Q: What is Base64 to WebP decoding?

A: It reverses a Base64-encoded WebP payload back to the original WebP image bytes. The decoded file can be previewed in the browser and saved as a normal .webp file.

Q: How can I tell whether a Base64 string is WebP?

A: WebP uses the RIFF container. Raw WebP Base64 commonly starts with UklGR. A full data URI starts with data:image/webp;base64,.

Q: Can I decode animated WebP?

A: Yes. Animated WebP payloads stay intact. Browsers with animated WebP support will animate the preview, and the download preserves the original animation data.

Q: Does decoding change image quality?

A: No. Base64 decoding is reversible. The output WebP has the same lossy or lossless compression, alpha data, metadata, and frames that were present before encoding.

Q: Why does my WebP preview fail?

A: The most common causes are a truncated Base64 string, characters copied from a wrapped log line, or a payload that is not actually WebP. Try a full data:image/webp;base64, URI or verify that the raw payload begins with UklGR.

Q: Is the Base64 string uploaded for decoding?

A: No. Decoding and preview happen in the browser. The page does not send your image payload to a server.

Q: Can I convert Base64 WebP into PNG or JPG here?

A: This tool restores the original WebP bytes. To change formats, download the WebP and use an image editor or conversion tool that re-encodes it as PNG or JPG.

// OTHER LANGUAGES