Convert any image to a Base64-encoded data URI string. Perfect for embedding images in HTML, CSS, or JSON.
Click to select an image
Base64 encoding is a method of converting binary data, such as images, into a text-based format using 64 printable ASCII characters. When applied to images, this produces a data URI string that can be embedded directly into HTML src attributes, CSS background-url properties, or JSON payloads without requiring a separate file or HTTP request. The resulting string is approximately 33 percent larger than the original binary file, but the trade-off can be worthwhile for small images, icons, and sprites where eliminating extra network requests improves page load performance.
Using this tool is incredibly simple. Click the upload area to select any image from your device — JPG, PNG, WebP, GIF, and other common formats are all supported. The Base64-encoded data URI string is generated instantly and displayed in the text area below. You can click Copy to Clipboard to copy the entire string for use in your code, or click Clear to reset and start over. A preview thumbnail of your image appears so you can confirm the encoding worked correctly before using the string in your project.
This tool processes everything locally in your browser — your images are never uploaded to any server, ensuring complete privacy. Base64 encoding is particularly useful for web developers who want to embed small images directly in HTML or CSS files, reducing the number of HTTP requests and potentially improving page load times. It is also valuable for creating self-contained HTML documents, embedding images in email signatures, storing small images in databases as text, and including image data in API responses. The tool is free, fast, and requires no registration.
Compress JPEG, PNG, and WebP images
Convert images between PNG, JPG, and WebP formats
Add text watermarks to your images
Generate QR codes from text or URLs
Pick colors and convert between HEX, RGB, HSL
View all image tools