inyourbrowser.com

Image to Data URI

Get a data: URI for any image — ready to paste directly into an <img src> or CSS background-image. No server needed.

Drop an image here

or click to browse

BASE64

Image → Data URI

Converts an image to a full data URI (with MIME type prefix) ready to embed in HTML or CSS.

Runs entirely in your browser

How it works

Text encoding uses the browser's built-in btoa and atob functions with proper UTF-8 handling. File reading uses the FileReader API — entirely within your browser, with no upload.

Your data stays local

All encoding and decoding happens inside your browser tab. The text or file you provide is never sent to a server — it stays entirely on your device.

Frequently asked questions

What is a data URI?

A data URI is a Base64-encoded version of a file prefixed with its MIME type, e.g. data:image/png;base64,.... It can be used anywhere a URL is accepted.

Will embedding images as data URIs affect performance?

For small images (icons, logos) it can eliminate an HTTP request. For large images it increases HTML size — use sparingly.

Which image formats are supported?

JPEG, PNG, WebP, GIF, SVG, and any format your browser can read.