Convert an image to a Base64 string, or paste Base64 text to decode it back into a downloadable image.
Base64 is a way of representing binary data, like an image file, as plain text made up of letters, numbers, and a few symbols. This tool converts an image into its Base64 text form, or takes a Base64 string and turns it back into a downloadable image, all directly in your browser.
Nothing is uploaded to a server, both directions of the conversion happen locally using JavaScript.
A data URI is a Base64 string with a small prefix that describes what kind of file it is, like data:image/png;base64, followed by the encoded data. This format lets an image be embedded directly inside HTML, CSS, or JSON without needing a separate image file, which is useful for small icons or images that need to be bundled inline with code.
Base64 encoding increases the size of the data by roughly 33% compared to the original binary file, since it's representing binary data using a more limited set of text characters. This is a normal and expected part of the format, but it's worth keeping in mind for very large images, where the resulting text string can get quite long.
Yes, JPG, PNG, and WEBP images can all be encoded to Base64 with this tool.
This usually means the pasted text isn't a valid Base64 image string, check that you've copied the entire string without any missing characters or extra whitespace, and that it starts with a valid data:image/ prefix or is pure Base64 data.
No, Base64 encoding and decoding is a lossless, reversible process, the decoded image is byte-for-byte identical to the original that was encoded.
Very large images will produce very long Base64 strings, which can be slow to display or copy in a browser text box, so this tool works best for reasonably sized images rather than very large, high-resolution photos.