Image to Base64 Converter

Convert images to Base64 data URIs for HTML, CSS, Markdown and JSON, or decode Base64 back to an image file. Free and private — runs in your browser.

Loading the tool…

What is a Base64 image?

Base64 writes a file’s bytes as plain text, so an image can live inside HTML, CSS, JSON or an email instead of as a separate file. A data URI adds the file type in front — data:image/png;base64,… — which browsers can display directly.

When to use it

  • Small icons and logos in CSS or HTML emails, saving a network request.
  • Embedding images in JSON APIs, config files or single-file HTML pages.
  • Debugging: paste a Base64 string from an API or log to see the image it holds.

Base64 is about a third larger than the original file, so keep it for small images. Everything here runs in your browser — nothing is uploaded.

Guides

All how-to guides →

All image tools →