Image ↔ Base64
Encode images to Base64 data URIs or decode Base64 back to an image.
Loading tool…
Processing happens on your device using your browser's CPU/GPU. Results are kept only in this tab's memory and are wiped when you click “Clear” or close the page.
About Image ↔ Base64
A Base64 data URI lets you paste an image straight into CSS, HTML, an e-mail template or a JSON payload, so it needs no separate file and no extra request. This tool encodes any image to a data URI with ready-made copy buttons, and it also decodes a Base64 string back into a downloadable picture. Both directions run entirely in your browser.
How to use Image ↔ Base64
- Choose Image to Base64 and pick a file, or switch to Base64 to Image to go the other way.
- When encoding, the data URI appears in the box along with its length in characters and bytes.
- Use Copy as CSS or Copy as img for a ready snippet, or Copy and Download for the raw string.
- When decoding, paste the data URI or bare Base64 and click Decode to preview and save the image.
What people use it for
- Inlining a small icon or logo in CSS so the page makes one request fewer.
- Embedding a signature or header image inside an HTML e-mail template.
- Passing an image through an API or config file that can only carry text.
- Recovering a picture from a Base64 string you found in code or a log file.
Good to know
Base64 makes data about 33% larger, so it suits icons and small logos rather than photographs. Keep inlined images under roughly 10 KB; beyond that a normal file loads faster and caches better. Decoding accepts a full data:image URI or a bare Base64 string, with PNG, JPEG, GIF and WEBP detected from the signature.