What it does
Image to Base64 turns an image into a Base64 data URL that you can embed directly in HTML, CSS, Markdown, JSON or an email, with no separate image file. It accepts PNG, JPG, GIF, WebP, SVG and ICO, and shows the type, size and dimensions.
How to use it
- Choose an image or drop it onto the page.
- Choose the output: Data URL, raw Base64, a CSS
background-imagerule, an HTML<img>tag, or Markdown. - Copy the result or download it as a text file.
Example
A small icon becomes:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…" alt="" />
or in CSS:
.icon { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…"); }
Good to know
- Embedding saves a network request but makes the HTML or CSS about a third bigger, and the image can no longer be cached on its own. It suits small icons and logos (a few KB), not photos.
- SVG files can often be embedded as plain text instead of Base64, which is smaller.
- Some email programs block data-URL images; test before sending a campaign.
FAQ
How do I turn Base64 back into an image? Use Base64 to Image.
Is my image uploaded? No. It is read and encoded inside your browser.