What Image to Base64 does
Image to Base64 encodes an image into a Base64 data URI and can decode one back to an image.
- Encode/decode
Convert an image to Base64 by uploading it; the tool encodes it into a Base64 data URI you can copy and paste directly into HTML, CSS or JSON. It also decodes Base64 back to an image. Everything runs in your browser.
A tool that encodes an image into a Base64 data URI (and decodes it back), for embedding images directly in code.
Related terms
Base64 data URIs let you embed an image directly in HTML, CSS or JSON without a separate file.
Paste a Base64 string to preview and download the original image.
Encoding and decoding happen locally in your browser.
Image to Base64 encodes an image into a Base64 data URI and can decode one back to an image.
The file is read with the FileReader API and output as a data URI; decoding parses the string back to bytes.
Inline small images in HTML/CSS, embed icons in JSON, or avoid extra network requests.
Base64 increases size by about a third, so it suits small images rather than large photos.
The image is processed entirely in your browser with the Canvas API; nothing is uploaded to a server.