Drag and drop an image here, or browse
Supports PNG, JPG, GIF, SVG, WebP — Max 10 MB
This free Base64 image encoder converts any image file into a Base64-encoded string or a complete data URI, ready to embed directly in your HTML, CSS, or JavaScript. All processing happens entirely in your browser — your images are never uploaded to any server.
Select or drag an image onto the tool. The browser reads the file using the FileReader API and converts the raw binary data to a Base64 string. You get both the raw Base64 output and a complete data: URI (including the MIME type prefix) that you can paste directly into an <img> tag or a CSS background-image property.
For large images, serving the file directly is usually more efficient. Base64 encoding increases data size by about 33%, so it is best suited for small assets under 10–20 KB.
No. The entire conversion happens in your browser using the JavaScript FileReader API. Your image never leaves your device. No data is transmitted to any server.
This tool supports all image formats your browser can read, including PNG, JPEG, GIF, SVG, WebP, BMP, and ICO. The output preserves the original MIME type in the data URI.
Base64 is the raw encoded string (e.g., iVBORw0KGgo...). A data URI wraps the Base64 string with a prefix that includes the MIME type: data:image/png;base64,iVBORw0KGgo... The data URI format is what you need to embed images directly in HTML or CSS.
This tool allows images up to 10 MB. However, Base64 encoding increases size by about 33%, so a 10 MB image would produce roughly 13.3 MB of Base64 text. For performance reasons, it is recommended to use Base64 encoding for small images (under 20 KB) when embedding in web pages.