How to use the Image to Base64 Converter
- For encoding, drop an image onto the page or paste it with Ctrl+V.
- Copy the data URI, raw Base64, HTML tag or CSS rule you need.
- For decoding, choose Base64 → Image and paste the string.
- Check the preview and click Download image.
About this tool
Convert image to Base64 text so you can embed a picture directly in HTML, CSS, JSON, email templates or code without a separate file. Drop in a PNG, JPG, WebP, GIF, SVG or icon and get four ready-to-copy versions: the full data URI, the raw Base64 string, an HTML tag and a CSS background-image rule.
It works the other way too: switch to Base64 → Image, paste a Base64 string or data URI, and the tool decodes it, shows a preview with the dimensions and format, and lets you download the image file. It even recognizes the image type when the data: prefix is missing.
Base64 makes data about a third larger than the original file, so it is best for small icons and logos. The image to Base64 conversion happens in your browser – nothing is uploaded.