Settings

Picture to Base64

Drop a picture here, choose one, or paste Press Enter to choose a file.

Base64 to picture

Questions people ask about DATAURI

When is a data URI a good idea?

For small things used once: an icon in a stylesheet, a logo in an email signature, a picture in a single-file HTML report. Base64 makes a file about a third larger and it cannot be cached on its own, so above roughly 10 KB a linked file is usually better.

What does it accept when decoding?

Plain Base64, a full data URI, Base64 split over several lines, the URL-safe alphabet with - and _, and Base64 with its = padding missing. The kind of picture is read from its first bytes, so it is named correctly even when the text says otherwise.

Is a decoded SVG safe to look at here?

Yes. It is shown as an image, and a browser never runs script inside an SVG shown that way. Saving it gives you the file exactly as decoded, script and all, so check it with SVGCLEAN before putting it on a website.

Doing this often? OBSCURA Umbra edits the code the picture is embedded in, and previews the page it belongs to. Everything is US$5 a month or US$48 a year.