Image to Base64 Converter
Free image to Base64 converter — turn PNG, JPEG, GIF, WebP or SVG images into a Base64 data URI you can paste into HTML, CSS or JSON, entirely in your browser.
Runs entirely in your browser — nothing you enter is uploaded or stored.
Embed images as text with data URIs
This tool turns any image into a Base64 data URI — a text string you can drop straight into an <img src>, a CSS background: url(...), a JSON payload or an email. It is handy for inlining small icons and placeholders so they load with the page and need no extra request.
Everything happens in your browser: the file is read with FileReader, encoded locally, and never leaves your device. Toggle the data: prefix off if you only need the raw Base64, and use the copy buttons for ready-made CSS or HTML snippets. To go the other way, use the Base64 to Image tool.
Frequently asked questions
What is a Base64 image (data URI)?
A data URI embeds an image directly inside text as a Base64 string, e.g. data:image/png;base64,iVBORw0KGgo… . You can paste it straight into an <img> src, CSS background, JSON or an email, so the image travels with the markup and needs no separate file request.
Does converting an image to Base64 make it bigger?
Yes — Base64 adds roughly 33% overhead versus the raw binary file. Data URIs are best for small assets (icons, tiny logos, placeholders). For large images a normal file request is usually faster.
Is my image uploaded to a server?
No. The image is read and encoded entirely in your browser with the FileReader API. Nothing is uploaded, logged or stored — you can verify it in the Network tab or in our Content-Security-Policy.
Which image formats are supported?
Any format your browser can read — PNG, JPEG, GIF, WebP, SVG, BMP, ICO and AVIF. The original bytes are encoded as-is, so the data URI keeps the exact format and quality of the file you pick.