Base64 image encoder and decoder DATAURI
Turn a picture into a data URI for CSS, HTML or JSON, or paste Base64 and see the picture inside it. Both run in this tab; nothing is uploaded.
Picture to Base64
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.