How to Convert an Image to Base64
Two directions, both in your browser.
Encode
Keep the mode on Image → Base64 and drop a file. The Base64 data URI appears instantly — switch the output to an <img> tag or a CSS background-image and click Copy.
Decode
Switch to Base64 → Image and paste a Base64 string or full data URI. The image renders and a Download button gives you the file back.
Use it
Paste the data URI straight into your HTML, CSS or JSON — no separate file, no extra request. Shrink the source first with the Image Compressor or Image Resizer to keep the string small.
Base64 is best for small assets like icons and logos. To change an image's actual format instead, use the Image Converter.
Frequently Asked Questions
Does this upload my image?
What is a Base64 data URI and why would I use one?
Why is the Base64 bigger than my original file?
Can I turn a Base64 string back into an image file?
Which image formats are supported?
Last updated: