Drag and drop any image to encode it as Base64. Get the data URI, CSS background, HTML img tag or raw Base64 string.
A Base64 data URI puts an image straight into HTML or CSS, like data:image/png;base64,iVBOR..., instead of linking to a separate file. That saves a network request, which helps for tiny icons, email signatures and single-file HTML documents. This tool turns an image you drop in into a data URI, an HTML img tag, a CSS background or raw Base64, and can decode Base64 back into an image.
Resize and compress the image first; the image resizer helps with that. For SVG files, plain URL-encoded SVG is often smaller than Base64. Keep an alt attribute on the img tag, as you would for any other image.