Image to Base64
Upload an image (PNG, JPG, GIF, SVG) and get its Base64 representation instantly, ready to use in <img src>, CSS background or data URIs. Also decodes a Base64 string back to an image.
Conversion
Drag an image here or click to upload it
PNG, JPG, GIF, WebP or SVG
Result
How to use: Base64 image
- 1Pick the direction: image to Base64 or Base64 to image.
- 2Drop the image (PNG, JPG, GIF, WebP or SVG) or paste the Base64 string.
- 3Copy the full Data URI, the Base64 only, or download the result.
What is it for?
- Inline small icons in CSS or HTML without extra requests.
- Embed images in emails or JSON.
- See which image a Base64 string contains.
Images as Base64 (data URI)
When it makes sense
Embedding an image as a data URI saves an HTTP request, useful for small icons, HTML emails or self-contained files. For large images it backfires: they grow by 33 % and are not cached separately.
Data URI format
It looks like data:image/png;base64,AAAA…. The MIME type (image/png, image/jpeg, image/svg+xml) must match the real content for the browser to display it.
Performance
Keep embedded images under a few kilobytes. For the rest, a normal file with browser caching and, where appropriate, modern formats such as WebP or AVIF is better.
Related tools
Frequently asked questions
Does the image leave my device?+
No. The whole process happens in your browser and nothing is uploaded to any server.

