Tools

Home
Base64 Encode/DecodeString to HexHash GeneratorUTF-8 Encode/DecodeURL Encode/Decode

Convert Data Uri To Image Online

Convert Data Uri To Image online. All processing happens in your browser.

Your files never leave your browser
No image loaded
INPUT
🖼

Drop image here or click to upload

Max 50MB • 100% Private

OUTPUT
Ready

Paste a data URI starting with data:image/... and get a real PNG, JPEG, GIF, or WebP file back. Works for strings copied from CSS, API responses, or canvas.toDataURL() output — no length limits, no signup. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Data URI
→
Decode Base64
→
Download Image

Your browser reads the MIME type from the data URI header (like image/png or image/jpeg), decodes the base64 payload into binary data, and renders the result on a canvas element. From there you can preview it at full size and save it as a file. The whole thing takes under a second, even for large images.

Examples

Extracting a Favicon from CSS

A designer sent you a stylesheet with an inline favicon. You need the .png file for a different project.

INPUT
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQ...
OUTPUT
favicon.png (16×16, 482 bytes)

Saving a Canvas Screenshot from an App

Your web app uses canvas.toDataURL() to generate a chart. The API returns the image as a data URI in JSON. You want the actual JPEG to drop into a report.

INPUT
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...
OUTPUT
chart-export.jpg (1200×800)

Recovering an Avatar from a Database Dump

You're migrating user profiles and the old system stored avatars as base64 data URIs in a text column. Quick way to eyeball what each one actually looks like before writing the migration script.

INPUT
data:image/webp;base64,UklGRlYAAABXRUJQVlA4...
OUTPUT
avatar.webp (128×128, 3.2 KB)

Who Uses This

👨‍💻 Frontend Developers

Pull inline images out of CSS or API responses to use as standalone assets.

🗃️ Database Admins

Preview base64-encoded images stored in text columns during migrations or audits.

🎨 Designers

Grab embedded icons or sprites from HTML emails and stylesheets for reuse.

🔍 QA Engineers

Verify what image a data URI actually renders when debugging test failures.

Common Mistakes

Pasting just the base64 without the header

The string needs to start with data:image/... — not just the encoded characters. Without the MIME header, the browser can't figure out what image format it's dealing with. Copy the full URI starting from data:.

Truncated strings from copy-paste

Data URIs can be thousands of characters long. If your text editor or terminal cut it off, you'll get a broken image or nothing at all. Double-check that the string ends properly — it shouldn't end with ... or cut off mid-character.

Using a non-image data URI

Data URIs can encode PDFs, fonts, audio — not just images. If your string says data:application/pdf or data:font/woff2, this tool won't help. It only handles image MIME types like PNG, JPEG, GIF, and WebP.

Technical Details

Frequently Asked Questions

How do I convert a data URI to an image file?

Paste the full data URI (starting with data:image/...) into the input area and click Process. The tool decodes the base64 content and renders the image on screen. Hit Download to save it as a PNG file.

What is a data URI and where do they come from?

A data URI embeds file content directly in a text string using base64 encoding. They show up in CSS background images, HTML img tags, API responses, and canvas exports. It is a way to include a file without making a separate HTTP request — but the trade-off is a really long string.

Is it safe to paste data URIs into online tools?

With this tool, yes. Nothing gets uploaded to a server — the decoding happens entirely in your browser using JavaScript. Your data URI and the resulting image never leave your device. That said, don't paste sensitive data into tools that require a server round-trip.

Why is my data URI not converting?

Most likely the string is incomplete or missing the header. A valid data URI looks like data:image/png;base64,iVBORw0KGgo.... If it starts with just the base64 characters, add the correct header. Also check that nothing got clipped during copy-paste — these strings can be very long.

Can I convert a data URI back to a specific format like JPEG or WebP?

The tool preserves whatever format is encoded in the data URI. If your string contains a JPEG, you get a JPEG. The download button saves as PNG by default, but the preview shows the original format. For format conversion after decoding, try one of the image converter tools on this site.

Share: