Image to Data URI
About Image to Data URI
Convert an image into a Base64 data URI such as data:image/png;base64,iVBOR... that can be embedded directly in HTML, CSS or JSON without a separate file request.
Drop an image, choose a file or paste from the clipboard. The file is read locally with the browser's FileReader API and never uploaded.
How to use
- Drag and drop an image, click to select one, or paste an image from the clipboard.
- Check the preview and copy the generated data URI.
- Use it as
<img src="...">in HTML orurl(...)in CSS.
FAQ
When should I use a data URI?
For small images such as icons and tiny backgrounds, where saving an HTTP request matters. For large images, a normal file is better because data URIs are about 33% larger and are not cached separately.
Which formats are supported?
Any image type your browser can read, including PNG, JPEG, GIF, WebP and SVG. The MIME type is taken from the file.
Is my image uploaded?
No. Conversion happens entirely in your browser.