100% local processing — your files and data never leave this browser. No uploads, no server storage.

OnboxTools

Free · Browser-only · No upload

Data URI to Image

Decode embedded data URIs back into downloadable images

Paste a data URI string — raw, wrapped in CSS url(), or inside an HTML img tag — and preview the decoded image instantly. Download as PNG, JPEG, WebP, or GIF.

Built for developers auditing inlined assets, recovering icons from stylesheets, and debugging markup without sending payloads to a server. Decoding runs entirely in your browser.

Converter controls

Image to Data URI

Used only when the input is raw Base64 without a data:image prefix.

Input Data URI
Image Preview

No Image Generated

Total Characters0
Total Lines0
Payload Size0 KB

More Image Tools

🖼️
Base64 to Image
🎨
Color Format
🎨
Color Picker
🖼️
Data URI to Image
🖼️
Image Compressor
🖼️
Image Resizer
🧬
Image to Base64
🔗
Image to Data URI
🖼️
JPEG to WebP
🖼️
JPG to PNG
🔄
PNG to GIF
🔄
PNG to JPG
PNG Transparency Creator
🖼️
SVG to PNG
🔄
WebP to PNG

Browse by category

Decode walkthrough

Paste data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA... and the preview shows the pixel graphic immediately. Click Download to save decoded-image.png.

Paste background-image: url("data:image/jpeg;base64,/9j/4AAQ..."); from a stylesheet and the tool extracts the URI without manual trimming.

Complete guide to decoding data URIs into images

When you need to reverse a data URI

Data URIs embed image bytes directly inside HTML, CSS, or JavaScript as a single long string. That is convenient for shipping self-contained prototypes, email templates, and critical-path icons, but the encoded text is unreadable on its own. When you need to inspect what was inlined, compare against a design file, or save a copy outside the document, you must decode the URI back into a normal image file.

Developers encounter this during code reviews, legacy migrations, and support tickets where a stylesheet contains background-image: url("data:image/png;base64,...") instead of a linked asset. Pasting the snippet into a decoder reveals the actual graphic — dimensions, colors, and whether the correct logo was embedded.

Designers auditing a handoff may receive HTML exports with every icon inlined. Rather than screenshotting the page, decoding preserves pixel fidelity and gives you an editable PNG or SVG file for the asset library.

What a data URI contains

A standard image data URI follows the pattern data:image/png;base64, followed by the encoded payload. The MIME segment — image/jpeg, image/webp, image/gif, image/svg+xml — tells the browser which decoder to use. The base64 segment expands the original binary into ASCII-safe characters suitable for pasting inside quotes.

Unlike a plain Base64 string, a data URI is self-describing: you do not need to guess the format if the prefix is intact. This tool accepts the full URI and extracts the image automatically. If only raw Base64 arrives without a prefix, pick a fallback format from the converter controls so the decoder can reconstruct a valid URI.

Whitespace and line breaks inside long strings are stripped during parsing. JSON-escaped quotes around a URI from an API response should be removed before pasting, but the tool tolerates common CSS and HTML wrappers without manual cleanup.

Extracting URIs from CSS and HTML

You do not need to isolate the data: segment manually. Paste an entire CSS rule such as .icon { background-image: url("data:image/svg+xml;base64,PHN2Zy..."); } and the tool pulls the URI from inside url(). The same applies to HTML fragments like img src="data:image/png;base64,iVBORw0KGgo..." — the decoder finds the embedded value and renders the preview.

This saves time when copying from minified production bundles or browser DevTools, where the surrounding syntax would otherwise require careful editing. If multiple data URIs appear in one paste, the first valid image URI is used.

For JavaScript template literals that assign src dynamically, copy only the string literal containing data:image — not the surrounding function — to avoid parsing noise.

How browser-side decoding works

After extraction, the tool assigns the URI to an image element for instant preview. When you click download, the browser reconstructs binary data from the URI and saves it with the correct file extension inferred from the MIME type.

Malformed input — truncated strings, wrong padding, invalid characters — surfaces as a preview error instead of a corrupted download. Fix the source payload and paste again. Very large URIs may take a moment on older hardware, but nothing is uploaded to a remote service.

SVG data URIs decode to vector XML inside the image blob. Raster formats decode to their native PNG, JPEG, WebP, or GIF structure. Re-encoding on download does not improve quality beyond what was embedded.

Practical workflows

Audit inlined icons before a performance pass: decode each URI, check file size, and decide whether to externalize heavy assets. Recover a favicon or spinner from a third-party widget when only the data URI is exposed in the DOM.

Pair this decoder with Image to Data URI when round-tripping assets — encode for a prototype, decode to verify the output matches the source, then download for archival. After decoding, run images through the compressor or resizer if you are preparing web-ready files.

When migrating off data URIs, decode here, save PNGs with clear filenames, and replace inline strings with img src paths in a single pull request. Document which URIs map to which files so QA can verify visual parity.

Privacy for sensitive embedded images

Signatures, QR codes, medical thumbnails, and proprietary diagrams sometimes travel as data URIs inside internal tools. Decoding locally means those bytes never leave your machine — no account, no server log, no retention policy.

Treat downloaded files like any sensitive export. Clear the textarea and close the tab when finished on shared workstations. The clipboard may still hold the URI string after copy operations elsewhere in your workflow.

Detailed guide

Fixing common decode errors

Ensure the string includes the full base64 payload — partial copy from DevTools is a frequent cause of failure. Remove surrounding JSON quotes. If the URI uses URL-safe Base64, replace - with + and _ with / before decoding.

Choosing a fallback format

The fallback format applies only when input is raw Base64 without a data:image prefix. For standard data URIs, the MIME type in the string determines the output extension automatically.

Common questions

Data URI to image FAQ

Is the Data URI to image decoder private?

Yes. Everything runs in your browser. Your input is not uploaded, logged, or stored on our servers.

Do I need an account?

No account or sign-up is required. Open the page and start using the tool immediately.

Can I paste CSS or HTML instead of a raw data URI?

Yes. The tool extracts data URIs from url() in CSS and src attributes in HTML img tags.

Do I need the data:image prefix?

Full data URIs decode directly. Raw Base64 without a prefix works when you select a fallback image format.

Why does the preview show invalid?

Truncated strings, bad padding, or non-image data URIs cause decode failures. Verify the complete payload was copied.

Which download format is used?

The file extension matches the MIME type in the URI — PNG, JPEG, WebP, GIF, or SVG.