Base64 image encoder / decoder
Drop an image to get a data URI, raw base64, and ready-made HTML/CSS snippets — or paste base64 to preview and download.
Your images never leave the browser — no upload, no server.
~~~
Mode
Drop an image here or click to select
PNG, JPEG, GIF, WebP, SVG
Reading file…
Preview
Data URI
Raw base64
HTML <img>
CSS background-image
Input
MIME: · Size:
Preview
~~~
About this tool
Base64 encodes binary data as ASCII text. Data URIs embed that text directly in HTML or CSS — handy for tiny icons, but base64 adds roughly 33% size overhead. Images over 50 KB are usually better served as files.
Encoding uses FileReader locally. Decoding accepts a full data URI or raw base64 and sniffs the image type from magic bytes when no MIME is declared.
~~~