Convert any image (PNG, JPG, GIF, WebP, SVG) to a Base64 data URI — or decode Base64 back to an image. Drag & drop, paste, or pick a file. All processing happens in your browser.
Click to browse or drag & drop an image here
PNG · JPG · GIF · WebP · SVG · BMP · up to 10 MB
This tool converts images to Base64 data URIs instantly in your browser. No upload, no server processing — your images stay private on your device.
Use it to embed images directly in HTML, CSS, JavaScript, or any JSON API without separate HTTP requests.
The tool uses the browser's FileReader API to read your image file as a binary data stream, then encodes it to Base64 text using the built-in readAsDataURL() method. The result is a data URI in the format data:[mime];base64,[encoded].
For decoding, paste any data URI or raw Base64 string and the tool renders the image directly in your browser. Note that Base64 encoding increases file size by approximately 33%.
A data URI embeds file content directly in HTML or CSS as text, in the format data:[mimetype];base64,[data]. This eliminates the need for a separate HTTP request to load the image, which can be useful for small icons or email templates.
Base64 is best for small images under 10–20 KB, such as icons, logos, or inline email graphics. For larger images, using standard URLs is more efficient because Base64 encoding increases file size by ~33%.
No. All conversion happens entirely inside your browser using JavaScript. Your image file is never sent to any server. The tool works completely offline once the page is loaded.
The tool supports all common image formats: PNG, JPG/JPEG, GIF, WebP, SVG, and BMP. The maximum file size is 10 MB. For very large images, consider using a regular image URL instead of Base64.
Use the HTML format option to get a ready-to-paste <img> tag. For CSS, use the CSS format option to get a background-image rule. You can also copy the plain Base64 string for use in JSON or JavaScript.
Yes. Switch to the "Base64 → Image" tab and paste any data URI or raw Base64 string. The tool will render the image and show its dimensions and MIME type. You can also download the decoded image.
No. All conversion happens in your browser. Your images never leave your device, ensuring complete privacy and security.