Upload an image to get its Base64-encoded string, or paste a Base64 string to preview and download it as an image.
Base64 is a text-based encoding that represents binary data — like an image file — as a string of plain ASCII characters. It exists because many systems, like JSON documents, CSS files, or certain APIs, are designed to carry text rather than raw binary data. Encoding an image as Base64 lets it travel through those text-only channels, such as embedding a small icon directly inside a CSS file as a data URI instead of a separate image request, or storing image data inside a JSON payload.
This tool handles both directions of that conversion. Encoding reads an uploaded image file and converts its binary content into a Base64 string, prefixed with the appropriate data URI header (e.g., "data:image/png;base64,") so it can be dropped directly into an HTML src attribute or CSS background-image property. Decoding takes a Base64 string — pasted with or without that data URI prefix — and reconstructs it back into a viewable, downloadable image file.
It's a staple for front-end developers embedding small icons or images directly into CSS or HTML to avoid extra network requests, developers debugging an API response that includes Base64-encoded image data, and anyone working with systems that store or transmit images as encoded text rather than binary files. Because encoding and decoding both happen locally using the browser's built-in FileReader and Canvas APIs, your image never leaves your device.