How to convert between an image and Base64
To encode, select an image and the tool generates both the raw Base64 string and a complete data URL in your browser, ready to copy into CSS, HTML, JSON, or a config file. To decode, paste either a full data URL or just the raw Base64 payload and the tool rebuilds the image with a local preview you can download.
Both directions run client-side, so neither the image nor the Base64 string is ever uploaded to a server. The conversion is instant, works offline, and keeps your content private on your device.
- Encode: select an image to get raw Base64 and a data URL
- Decode: paste a data URL or raw Base64 to rebuild the image
- Preview the result locally
- Copy or download the output
Why encode and decode live in one tool
People rarely think of Base64 as two separate jobs. They need to move quickly between an image file and a string payload, so combining encode and decode in one tool keeps that round trip in a single place instead of hunting for two utilities.
Base64 image strings are handy for inlining small icons in CSS or HTML to avoid extra requests, embedding images in JSON or data files, or pasting an image into a system that only accepts text. Decoding lets you turn any of those strings back into a viewable, downloadable image.