Image Tools
Image to Base64 / Data URI
Convert an image into a Base64 data URL you can embed inline.
Free foreverRuns in your browserNo sign-up
Drop an image here, or
Data URLs embed the image directly, avoiding an extra request. Best for small images; large files make the data URL very long.
About the Image to Base64 / Data URI
A data URL embeds an image directly in your HTML or CSS as Base64 text, avoiding a separate network request.
This tool converts any image you drop in into a data URL, and gives you a ready-to-paste CSS background snippet.
It is ideal for small icons and sprites; for large images a normal file is usually better.
Key features
- Drag and drop or choose a file
- Copy the data URL or a CSS snippet
- Shows source and encoded size
- Local, private conversion
How to use
- 1Drop or choose an image.
- 2Copy the data URL or the CSS background snippet.
Examples
Inline an icon
Input:
icon.pngOutput:
data:image/png;base64,iVBORw0KGgo…The image becomes a data URL you can paste into src or CSS.
Frequently asked questions
- When should I use a data URL?
- For small images like icons and logos, where saving a request matters. Base64 adds about 33% to the size, so it is not ideal for large images.
- Which formats are supported?
- Any image your browser can read, including PNG, JPG, GIF, WebP and SVG.
- Is my image uploaded?
- No. The file is read locally with the browser's FileReader; nothing leaves your device.
