Free Image to Base64 Converter Online
Convert images to Base64 strings and decode Base64 back to images.
Free image to Base64 converter online — encode any PNG, JPG, GIF, or WebP image to a Base64 data URI string, or decode a Base64 string back to a viewable image. This free online Base64 image encoder runs entirely in your browser — no files are uploaded and your data stays private. Base64 image encoding is used by web developers to embed images directly in HTML or CSS without separate file requests, in JSON APIs to transmit binary image data as text, and in email templates to inline images. The output is a data URI (e.g. data:image/png;base64,...) that you can paste directly into an img src attribute or CSS background-image. This tool is essential for front-end developers and email template designers.
Upload an image
Upload an image to encode
How to Use
- 1
Choose mode
Select "Encode" to convert an image to Base64, or "Decode" to convert a Base64 string back to an image.
- 2
Upload or paste
In Encode mode, upload your image file. In Decode mode, paste your Base64 string into the text area.
- 3
Get your result
The Base64 data URI or decoded image appears immediately.
- 4
Copy
Click the copy button to copy the Base64 string to your clipboard.
- 5
Use it
Paste the Base64 string into your HTML, CSS, or API code.