Image to Base64
Convert an image file to a Base64 data URI string.
Drop an image here or click to browse
Supported: PNG, JPEG, GIF, WebP, SVG
Related Tools
FAQ
- What image formats are supported?
- PNG, JPEG, GIF, WebP, and SVG are all supported. The output data URI will include the correct MIME type automatically based on the uploaded file.
- Is my image uploaded to a server?
- No. The conversion is done entirely in your browser using the FileReader API. Your image never leaves your device.
- How do I use the Base64 data URI in HTML?
- Use it as the src attribute of an img tag: <img src="data:image/png;base64,..." />. You can also use it in CSS as a background-image value.
Upload any image (PNG, JPEG, GIF, WebP, or SVG) and instantly convert it to a Base64-encoded data URI. The resulting string can be embedded directly in HTML, CSS, or JSON without needing a separate file. Conversion happens entirely in your browser — your image is never uploaded to any server.