Free · runs in your browser · no upload · no quota
Image to Base64 Converter
Drop an image and get its Base64 as a ready-to-paste data URI, an HTML <img> tag or a CSS background. Works with PNG, JPG, SVG, WebP, GIF, ICO and any other file.
Drop an image here or click to choose one
How to Convert Image to Base64
- Choose the image
Drop it on the box or click Open file. Any image type works, and any other file too. - Pick the output
Data URI for most uses, HTML <img> or CSS background to paste straight into your code, or plain Base64 for APIs. - Copy the result
Click Copy and paste it where you need it, or download it as a text file.
Example
logo.png (1×1 px)
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==
Frequently Asked Questions
-
When should I embed an image as Base64?For small images — icons, tiny logos, placeholders — in an e-mail template, a single-file HTML page or a CSS file, where saving one request matters more than size. For large photos a normal image file is better: Base64 is about a third bigger and cannot be cached separately.
-
What is a data URI?A URL that carries the file itself:
data:image/png;base64,followed by the Base64. Browsers accept it anywhere an image URL is expected — insrc, in CSSurl()and in Markdown. -
Is there a size limit?Files up to 25 MB are accepted, but anything over a few hundred kilobytes makes a very long string; for those a normal image file is the better choice.
-
Is my image uploaded?No. It is read by your browser and never sent to a server.
More browser tools
Working with files rather than text? Our file converters handle PNG to WebP, JPG to WebP, SVG to PNG and 400+ other formats.