Convert images to Base64 text, or paste Base64 back into an image — entirely in your browser.
Drop an image here or click to browse
PNG, JPEG, WEBP, or GIF up to 25MB — stays on your device
Base64 encoding turns binary image data into plain text, so it can be embedded directly inside HTML, CSS, JSON, or a data URI without a separate file request. This tool converts images to Base64 in several ready-to-use formats, and can also decode a Base64 string or data URI back into a downloadable image. Everything happens locally in your browser — nothing is uploaded to a server.
What is Base64 encoding used for?
Base64 turns binary data like an image into plain text, which lets you embed it directly inside HTML, CSS, or JSON without hosting a separate file.
Is my image uploaded anywhere?
No. Encoding and decoding both happen entirely in your browser using JavaScript — your image and Base64 text never leave your device.
What image formats are supported?
Encoding accepts any image your browser can read, including PNG, JPEG, WEBP, and GIF. Decoding auto-detects PNG, JPEG, WEBP, and GIF from the data itself.
Why is the Base64 bigger than my image?
Base64 encodes every 3 bytes of binary data as 4 text characters, which adds roughly 33% to the size. It is a text-safe trade-off, not a bug.
Can I decode a data URI without the "data:image/png;base64," prefix?
Yes. If you paste raw Base64 without a prefix, the tool inspects the decoded bytes for a PNG, JPEG, GIF, or WEBP signature to detect the image type automatically.
When should I inline an image as Base64?
Base64 is useful for small icons or images where you want to avoid an extra network request — for example inside CSS, an email template, or a single-file HTML export. For larger photos, a regular image file with caching is almost always faster.
Your image and Base64 text are processed entirely in your browser. Nothing is ever uploaded to a server.