Encode an image as a Base64 data URI
Convert any image into a Base64-encoded string or data URI that can be embedded directly inside HTML, CSS, JSON, Markdown, or email templates without needing a separate file URL. Supports JPG, PNG, WebP, GIF, and SVG. The tool reads your file with the browser's FileReader API, so encoding is instant and completely offline.
Three outputs are provided: the full data URI (ready to paste into <img src> or a CSS url(โฆ)), the raw Base64 payload without the MIME prefix (useful for API payloads and JSON bodies), and a ready-to-use HTML snippet. Keep in mind that Base64 adds roughly 33% to the size of the original file, so inline images are best used for small icons and sprites rather than large photos.