Image to Base64 converter
Convert PNG, JPG, WebP, GIF or SVG into a Base64 data URI for CSS and HTML.
Input
You can also paste an image with ⌘/Ctrl+V.
Result
Preview
The preview appears here.
Everything happens in your browser. Your data never leaves your device.
What is it?
A Base64 data URI contains the whole image as text. You can paste it straight into CSS, HTML or an email template without hosting a separate file.
How it works
Choose an image, drop it onto the field or paste it from the clipboard. Pick an output format and copy the result.
FAQ
- Which formats are supported?
- PNG, JPG, WebP, GIF and SVG up to 5 MB. The type is detected from the file content, not from the file name.
- When is Base64 worth it?
- For small images such as icons or placeholders. Larger images are better served as separate files, because Base64 adds about 33 percent and cannot be cached on its own.
- Is my image uploaded?
- No. The image stays on your device, the conversion runs in your browser.