Convert images to Base64 data URIs. Get ready-made HTML img src and CSS background-image snippets instantly.
Convert to Base64 string
Upload any image (PNG, JPEG, WebP, GIF) and instantly get the Base64 encoded string. Use it in HTML img tags, CSS backgrounds, or JSON APIs without needing a file server.
Base64 converts binary image data into ASCII text, allowing images to be embedded directly into HTML, CSS, or JSON. Ideal for small icons and logos in web apps.
Convert images to Base64 data URIs for embedding directly in HTML, CSS, or JSON. Useful for small images like icons and logos in web projects, email templates, and apps where you want to avoid separate file requests.
Base64 encoding runs in-browser using the FileReader API. Your images are converted without any upload.
Select your image file.
The Base64 string appears automatically. Click Copy.
Paste as src="data:image/png;base64,..." in HTML, or url("data:...") in CSS.
Download the .txt file containing the Base64 string.
Base64 converts binary image data to ASCII text that can be embedded in HTML/CSS/JSON without separate file requests.
Small images may load faster (no HTTP request). Large images are not recommended as Base64 is ~33% larger than binary.
Yes — paste a data URI and the tool decodes it back to the original image.
Practically, keep Base64 images under 10 KB for performance reasons. Larger files work but slow down pages.
JPG, PNG, WebP, GIF, and SVG all work.