What this tool does
Image to Base64 turns a picture into a string of plain text, and turns Base64 text back into an image file. Both directions live on the same page, with an option to include the data URL prefix when encoding.
Everything happens in your browser — no file is uploaded and nothing passes through a server.
How to use
- Pick a direction Encoding (image to text) uses drag and drop; decoding (text to image) uses paste.
- Encode: drop an image Drop a PNG, JPG, WebP or GIF into the dashed area and get the Base64 text to copy or download.
- Decode: paste and restore Paste the Base64 text (a data:image/png;base64, prefix is fine) and press decode to get a downloadable image.
FAQ
Can I use the output directly in a page?
Yes. With the data URL prefix you can assign it to an img src or a CSS url() and the browser renders it, with no separate image file needed.
How much larger does Base64 make a file?
About 33% larger, since 3 bytes become 4 characters. Fine for small icons and avatars; keep large photos as separate files so they do not slow down first paint.
How is the image type determined when decoding?
The engine reads the header magic bytes to detect PNG, JPEG, GIF or WebP; if the input carried a data URL prefix, the declared type takes priority.
Is batch conversion supported?
Not yet — one file at a time.
Is my file uploaded?
No. Encoding and decoding both run in your browser; the file never leaves your device.
What if the pasted text has spaces or line breaks?
Whitespace is stripped before decoding. Illegal characters (an exclamation mark, say) raise a clear error instead of producing a broken image.
Limits
One file up to 50MB; Base64 adds about 33%, so very large images can strain a browser tab.
Base64 encode and decode only — no compression, resizing or format conversion (those are separate tools).
One file at a time; no batch mode.