Skip to content
Free tool · runs in your browser

Image to Base64 data URI

Embed an image inside your HTML so a single-file page never shows a broken picture. Drop an image, copy the <img> tag or CSS, done.

What a Base64 data URI is

A data URI puts a file's contents directly into the place a URL would normally go: <img src="data:image/png;base64,iVBORw0…">. The browser decodes it instead of downloading anything. Base64 represents binary data with 64 safe text characters, which costs about 33% in size — a 30 KB PNG becomes roughly 40 KB of text — but it means the image can never go missing, because it is part of the HTML itself.

When inlining images is the right call

  • Single-file pages you will email, share as one attachment or paste into the HTMLtoLink editor.
  • Logos, icons and small illustrations under roughly 100 KB.
  • HTML email signatures and templates, with the caveat that some email clients block data URIs.

For photo-heavy pages it is the wrong call: a 2 MB photo becomes 2.7 MB of text that must download before anything after it renders. Upload those sites as a ZIP instead — see ZIP website to a link.

SVG gets special treatment

SVG is already text, so this tool URL-encodes it instead of Base64-encoding it. The result is smaller and still readable, and works everywhere an image URL does.

Related guides

Frequently asked questions

Does Base64 reduce image quality?

No. Base64 is a lossless text encoding — the decoded image is byte-for-byte identical to the file you dropped.

Is there a size limit?

Browsers handle data URIs of many megabytes, but anything above a few hundred kilobytes slows the page noticeably. Compress first, or keep large images as separate files in a ZIP upload.

Can I paste an image from the clipboard?

Yes — copy an image (for example a screenshot) and press Ctrl/Cmd+V on this page.

More free tools

Your HTML deserves a real link

Paste code, drop a file, a ZIP or a whole folder — get a live URL with your own address, an optional password and a QR code. Free to start with Google sign-in; paid plans keep links online for good.

Turn HTML into a link