Data URI output
Full Base64 data URI string ready for inline embedding anywhere.
100% free — convert any JPG, PNG or WebP image to a Base64 data URI instantly. Copy the raw string, an HTML <img> tag, CSS background-image or JavaScript variable — perfect for developers embedding images inline. Nothing leaves your browser.
or click to browse
JPG, PNG & WebP · paste with Ctrl+V / ⌘VUpload once, copy the format you need — ideal for HTML emails, inline CSS and small assets.
Drag and drop, browse, or paste an image from your clipboard.
The tool generates a Base64 data URI plus HTML, CSS and JS snippets.
Click Copy on the format you need and paste it into your project.
Every output format you need — from raw data URIs to paste-ready code snippets.
Full Base64 data URI string ready for inline embedding anywhere.
Pre-built img tag with the encoded src attribute — paste into HTML or email.
background-image declaration with the data URI — drop into stylesheets.
Const variable assignment for use in scripts and frameworks.
Encoding happens locally — your images are never uploaded.
No sign-up, no limits — encode as many images as you need.
Developers often need to embed images directly in HTML, CSS or JavaScript without hosting separate files. A Base64 data URI encodes the image as a text string you can paste anywhere. This free image to Base64 converter reads your file locally and outputs the data URI plus ready-made snippets for HTML <img> tags, CSS background-image and JavaScript variables.
Base64 is ideal for small icons in HTML emails (where external images are blocked), inline SVG replacements, and reducing HTTP requests for tiny assets. For large photos, regular image files are more efficient — Base64 adds roughly 33% overhead. This tool shows the encoded size so you can decide.
Everything runs in your browser on Uzetool — explore more developer tools.
Upload your image to this tool. It reads the file locally and displays the Base64 data URI plus HTML, CSS and JavaScript snippets. Click Copy on the format you need.
A data URI embeds file content directly in a URL string (data:image/png;base64,...). It lets you inline small images in HTML, CSS or JavaScript without separate image files.
Yes — 100% free with no sign-up or usage limits.
No. FileReader reads your image locally in the browser. Nothing is sent to any server.
JPG, PNG and WebP images are supported. The output data URI preserves the original MIME type.
Base64 works well for tiny icons, HTML emails and reducing HTTP requests for small assets. For large photos, use regular image files instead — Base64 increases file size by about 33%.