Convert an image to Base64 online
Turn an image into plain text — base64, the encoding that lets binary data like a photo travel inside places that only accept text: CSS, JSON, HTML, an email template, a config file. Add your images and download both the raw base64 and a ready-to-use data URI for each.
A data URI is the base64 with a small prefix (data:image/png;base64,...) that tells whatever reads it what the encoding and format are, so it can be dropped straight into a src or url() attribute with nothing else needed.
Your images never leave your device. Encoding runs entirely in your browser, so nothing is uploaded, stored, or scanned, and a batch costs no more than a single file.
or drop them here — nothing is uploaded
How to image to base64
Add your images
Drop JPG, PNG, WebP, GIF, or BMP files into the box, or click to browse.
Encode and download
Press Image to Base64. A plain base64 file and a data URI file download for each image.
Frequently asked questions
Are my images uploaded anywhere?
No. Encoding runs in your browser using JavaScript, so your files stay on your device. You can confirm this by opening your browser devtools Network tab while working — there are no upload requests.
What's the difference between the two downloads?
The base64 file is just the encoded data on its own — useful when something else supplies the format and encoding declaration itself, like a JSON field. The data URI file wraps that same data with a `data:image/...;base64,` prefix, which is what you paste directly into an HTML `src`, a CSS `url()`, or anywhere else that expects a complete, self-describing value.
Why would I embed an image as base64 instead of linking to a file?
To avoid a separate network request — useful for a small icon inside CSS, an inline email image, or a self-contained HTML file with no external assets. The trade-off is size: base64 text runs about 33% larger than the original binary file, so it is a poor fit for anything but small images.
Is there a size limit for this to make sense?
Nothing technical stops you encoding a large photo, but the 33% size increase and the fact that a data URI cannot be cached separately from the page it's embedded in both argue for keeping this to small images — icons, logos, small thumbnails — rather than full photographs.
Is there a limit on how many files?
Thirty at a time, which is a limit of your device rather than our policy — everything is held in memory while it works.
I need to go the other way — decode base64 back to an image?
That is Base64 to Image, a separate tool built for that direction.