Hoglet

Image to Base64

A picture or any file to turn into Base64

Choose, drop or paste a picture, an SVG or any other file. It is read here and never uploaded.

or paste with Ctrl+V

Read on this device, nothing uploaded

Image to Base64: Data URI, CSS and HTML, Private

Turn a picture or any file into Base64 or a data URI.

Choose, drop or paste a picture, a drawing (SVG) or any other file, and its Base64 is written out at once, in the form you choose: a data URI, plain Base64, a CSS background or an HTML picture tag. Copy it, save it as a file, or send it on to another tool. The file is read on your device and nothing is uploaded. Base64 is about a third larger than the file, so it suits small pictures such as icons and logos; a large photo is better left as a file. Files up to 20 MB are taken.

How to use Image to Base64

  1. Choose, drop or paste a picture, an SVG or any other file.
  2. Under Write it as, pick Data URI, Base64, CSS or HTML.
  3. Press Copy to take all of it, or save it as a file.

Image to Base64: common questions

Is it safe to convert an image to Base64 online?

Image to Base64 reads the file in your browser, on your device, and writes the Base64 there. Nothing is uploaded, and it works offline.

Is there a file size limit for image to Base64?

Image to Base64 takes files up to 20 MB. Base64 is about a third larger than the file, so it suits small pictures such as icons and logos; a large photo is better left as a file.

How do I use a Base64 image in CSS or HTML?

In Image to Base64, choose CSS for a background with the data URI inside it, or HTML for an img tag to paste into a page, which can carry the picture’s width and height. Write what the picture shows in its alt text.

Everything stays on your device. Nothing is uploaded. Works offline once your first visit has stored the app.