Image to Base64

Drop an image to get a Base64 data URI, plus ready-to-paste HTML and CSS. Your file never leaves your browser.

When to inline images

Inlining a small icon as a data URI saves an HTTP request, which can help for tiny images used on every page. For anything larger than a few kilobytes it usually hurts: Base64 adds about 33% to the size, and inlined images can't be cached separately from the page or stylesheet.

For SVGs, a URL-encoded data URI is often smaller than Base64; for icons, consider an inline <svg> instead.

Private

Everything runs in your browser. Nothing you paste is uploaded, logged or stored on a server.

Questions

Is there a size limit?

Files up to 10 MB work, but data URIs that large are rarely a good idea in production.

How do I turn Base64 back into an image?

Paste the full data URI (starting data:image/…) into your browser's address bar, or decode it with our Base64 tool.

Related tools