Image to Base64
Turn an image into text you can paste straight into HTML, CSS or JSON, or turn Base64 back into an image.
- 100% free
- No sign-up
- Runs in your browser
Report a problem with this tool
How to use Image to Base64
Add an image
Choose a PNG, JPG, GIF, WebP, SVG or ICO file. It’s encoded straight away, in your browser.
Pick the format
Choose a data URI, Base64 only, a CSS background-image rule or an HTML img tag with the width and height filled in.
Copy or save
Copy the result or download it as a file. To go the other way, switch to Base64 → image and paste your text.
Why use Utils365
Four ready formats
Data URI, raw Base64, CSS and HTML, so there’s nothing to edit by hand before pasting.
Sizes up front
See the file size before and after: Base64 is about 33% bigger, which matters for page weight.
Works both ways
Paste a data URI or plain Base64 to preview the image and download it as a normal file.
Nothing uploaded
Encoding and decoding happen in your browser, so private images stay on your device.
Frequently asked questions
What is a Base64 image?
An image file written out as text using 64 safe characters. Put after data:image/png;base64, it becomes a data URI that browsers show like any image address.
Why is Base64 bigger than the image?
Every 3 bytes become 4 characters, so the text is about 33% bigger. A 30 KB PNG becomes about 40 KB of Base64, before any compression by the web server.
When should I use a data URI?
For small images, roughly under 10 KB, such as icons, logos in HTML email and tiny backgrounds. Bigger images are better as separate files, which browsers can cache and load in parallel.
How do I use Base64 in CSS?
Choose CSS background and paste the rule, background-image: url("data:image/png;base64,…"), into your stylesheet. SVG icons work the same way.
How do I turn Base64 back into an image?
Switch to Base64 → image and paste the text, with or without the data: prefix. The tool recognises PNG, JPG, GIF, WebP, SVG, BMP and ICO, shows a preview and lets you download it.
Is there a size limit?
Images up to 20 MB can be encoded. Results over 200,000 characters are shown cut short, but Copy and Download always give the whole text.