Base64 to Image
Convert base64 to image online free. Paste a data URI or base64 string, preview instantly, and download PNG, JPG, or WebP — all in your browser.
Or try an example
src or CSS background-image.Help Us Improve
—
(—)
Free image to URL converter: turn a picture into a base64 data URI for HTML img src or CSS background—copy the image link string in your browser.
Raw base64 data URI
Copy data:image/…;base64,… for any paste target — png to base64 included.
HTML image tag
One-click <img src="…"> for email HTML and static pages.
CSS background
Ready-made background-image: url("…") rule.
Original file bytes
Uses FileReader—keeps the source format, including animated GIF.
Size readout
See file size and approximate data URI payload size.
Private conversion
No server upload; everything stays on your device.
Upload a picture
Drop JPG, PNG, WebP, GIF, or another image (15 MB max).
Pick the output format
Choose raw Data URI (base64), HTML <img>, or CSS background.
Copy the result
Click Copy and paste into your HTML, CSS, or email template.
Keep files small
Data URIs work best under a few KB—compress icons before embedding.
HTML vs CSS caching
URIs in HTML are not cached like separate images; CSS reuse can still help within one stylesheet.
Prefer sprites for many icons
Dozens of data URIs bloat CSS—consider a sprite sheet or icon font instead.
Need a full page?
Use /image-to-html to download a complete HTML document with the image embedded.
Check MIME in the prefix
The data:image/png;base64, (or jpeg/gif/webp) prefix should match your file type.
Email clients vary
Some clients block or truncate huge data URIs—test signatures before sending.
Online PNG Tools (convert PNG to base64)
Competitor ranking for png to base64 and image to base64. This page matches that intent with original-byte data URIs, HTML/CSS wrappers, and private browser encoding.
Ezgif.com Image to Data URI
Popular data URI converter with HTML/CSS options. Requires server upload.
Base64 to Image (/base64-to-image)
Reverse direction: paste base64 / data URI and download an image file.
Image to HTML (/image-to-html)
Builds a full HTML document; may re-encode via canvas instead of original bytes.
This image to base64 tool
Browser-only png/image to base64 converter with raw, HTML, and CSS outputs—no upload.
Self-contained HTML emails: Embed small logos in signatures without external image hosting.
Single-file demos: Ship a prototype page with icons inline—no asset folder required.
CSS icon snippets: Paste tiny PNG/SVG-as-raster icons into background-image rules.
Docs and gists: Include screenshots in Markdown/HTML samples that travel as one blob.
Offline UIs: Keep critical images available when network requests are blocked.
Quick “image link” for code: Generate a pasteable image URL string without opening DevTools.
Instant
Encode as soon as the file loads—no queue or wait.
Three output shapes
Raw, HTML, and CSS cover the usual paste targets.
Private
Images are not uploaded to convert.
Free
Unlimited copies without watermarks or accounts.
Format-faithful
Original MIME type and bytes, including GIF animation.
Works with the HTML tool
Use /image-to-html when you need a full downloadable HTML document.
“Data URLs, URLs prefixed with the data: scheme, allow content creators to embed small files inline in documents.”
Data URLs: This tool generates data: URLs so images can be embedded inline without separate HTTP requests for the asset file. developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs
“The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer.”
FileReader API: Conversion uses FileReader.readAsDataURL so encoding happens entirely in the browser from the selected file. developer.mozilla.org/en-US/docs/Web/API/FileReader
“The HTML img element embeds an image into the document.”
HTML img element: The HTML output mode places the data URI in the img src attribute for self-contained markup. developer.mozilla.org/en-US/docs/Web/HTML/Element/img
“The background-image CSS property sets one or more background images on an element.”
CSS background-image: The CSS output mode wraps the data URI for use as a background-image value. developer.mozilla.org/en-US/docs/Web/CSS/background-image