This free client-side tool converts any image file (PNG, JPG, GIF, WebP, SVG) into a Base64-encoded string or a complete data URI. The conversion runs entirely in your browser using the FileReader API — no file is ever uploaded to a server.
Base64 is a binary-to-text encoding scheme that represents binary data (such as an image file) as a string of ASCII characters. When prefixed with a MIME type declaration, the result is called a Data URI, which can be embedded directly into HTML, CSS, JSON, or JavaScript without referencing an external file.
background-image: url(data:image/png;base64,...)
Base64 encoding increases file size by approximately 33% compared to the raw binary file. For this reason, Base64 embedding is most efficient for images under 5 KB. Larger images should be served as standard HTTP resources.
JavaScript is required to use the interactive tool on this page. Please enable JavaScript in your browser.