Image to Base64 Converter

Convert an image file to a Base64 data URI for embedding in CSS or HTML, or decode a data URI back to an image — all in your browser.

Image → Base64
Copied
Base64 → Image

Base64-encoded images can be embedded directly in CSS (background-image: url(data:image/png;base64,...)) or HTML, avoiding a separate network request for small icons and assets.

Frequently asked questions

How do I convert an image to Base64 online?

Click the upload area (or drag and drop an image onto it) and the Base64 data URI appears instantly — nothing is uploaded to a server.

Why does the data URI start with "data:image/png;base64,"?

That prefix tells the browser the MIME type and encoding of the embedded data, so it can be used directly as a src or background-image value.

Related tools

← Back to all tools