Image ↔ Base64 Converter
Encode images as Base64 data URIs for embedding in CSS, HTML, or JSON — or decode a Base64 string back to a downloadable image. Both directions, fully local.
Drop an image here, or click to browse
Supports JPG, PNG, GIF, WebP, SVG, ICO — processed locally, never uploaded.Base64 data URI
CSS snippet
HTML snippet
The preview updates live as you type.
Something wrong with this tool? Tell us and we'll fix it
How to use
- Drop an image to encode, or paste a Base64 string to decode.
- Get the data URI (with ready-made CSS/HTML snippets) or the decoded image.
- Copy or download the result.
Frequently asked questions
When should I use Base64 images?
For tiny images like icons and placeholders in CSS/HTML, or when embedding images in JSON APIs. It inflates size by ~33%, so never use it for large photos.
What formats are supported?
Encoding works with JPG, PNG, GIF, WebP, SVG and ICO. Decoding auto-detects the format from the data URI header.
Is my image uploaded?
No. Encoding is just reading the file bytes locally in your browser — nothing is transmitted.