Image to Base64 Converter
Convert PNG, JPG, WebP, SVG, GIF, and AVIF images to Base64 Data URLs, then preview or copy the result directly in your browser.
Image to Base64
PNG, JPG, WebP, SVG, GIF, and AVIF are supported. Files are converted locally in this browser and are not uploaded to this site server.
Drop an image here, paste from clipboard, or click to choose.
Preview will appear here.
Preview Base64 Image
Preview will appear here.
Data URL, privacy, and use cases
- Use the full Data URL when embedding images in HTML img src, CSS background-image, JSON payloads, or quick prototypes.
- Raw Base64 previews auto-detect PNG, JPG, WebP, GIF, AVIF, and SVG when possible. The fallback type is only used when the format cannot be inferred.
- Base64 is usually about one third larger than the original file. Large production images are usually better served as normal image files.
- Conversion and preview run in your browser. Generated history is stored only in localStorage, and images larger than 1 MB are not saved to history.
Image Base64 FAQ
How do I convert an image to Base64?
Upload, paste, or drop a PNG, JPG, WebP, SVG, GIF, or AVIF image. The tool generates a complete data:image/...;base64,... Data URL and raw Base64 payload.
Can I convert Base64 back to an image?
Yes. Paste a Data URL or raw Base64 image into the preview panel. After it renders, you can download the normalized image file.
Should I copy Data URL or raw Base64?
Copy the full Data URL for HTML, CSS, Markdown-like content, and browser previews. Copy raw Base64 only when an API, JSON field, or another system explicitly asks for the payload without the data:image prefix.
Is this Base64 image converter private?
Yes. Files are processed locally in your browser. The page does not upload your image to this site server, and generated history stays in this browser localStorage.
When should I use the text Base64 converter instead?
Use the text Base64 converter for plain text, JWT fragments, configuration strings, API tokens, or other non-image content.