Image to Base64 Converter

Turn any image into a Base64 data URI you can paste straight into HTML, CSS or JSON — or decode a Base64 string back into an image.

Drop an image here or browse files JPG, PNG, WebP, GIF, SVG · or paste with Ctrl+V

Base64 → Image

How to convert an image to Base64

  1. Drop or paste an image above.
  2. Choose the output format: data URI, raw Base64, an <img> tag or a CSS rule.
  3. Click Copy and paste it into your code.

When should you inline images as Base64?

Inlining small icons and logos (under ~10 KB) saves an HTTP request. For larger images, Base64 adds about 33% to the size and cannot be cached separately, so a normal image file is usually better.

Frequently asked questions

Are my images uploaded to a server?

No. ToolSmith processes every image locally in your browser. Your files are never uploaded, stored or seen by anyone — you can even disconnect from the internet after the page loads and the tool keeps working.

Why is the Base64 string bigger than my image?

Base64 represents every 3 bytes as 4 text characters, so encoded data is about 33% larger than the original file.

Can I convert Base64 back to an image?

Yes. Paste the string into the “Base64 → Image” box to preview it and download the image.