How to use
- Paste the Base64 string or the data:image/svg+xml;base64 URI.
- Check the preview and the detected format and dimensions.
- Keep SVG as the download format. For SVG input the file is saved as SVG text.
- Download the .svg file and open it in an editor if you want to read or change the markup.
Finding SVG inside Base64
Unlike other image formats, SVG is plain XML text. A file that starts with <svg encodes to Base64 beginning with PHN2Zy, and one that starts with an XML declaration (<?xml) begins with PD94bWwg. Base64 SVGs are common in CSS background images, icon sets, design tool exports and email templates. The MIME type is image/svg+xml.
Many SVG data URIs are not Base64 at all but percent-encoded text, such as data:image/svg+xml,%3Csvg.... This tool expects Base64, so parse those with the Data URI generator instead.
Reading the SVG code
The preview shows how the graphic renders, but the interesting part is often the markup: path data, colours, a viewBox or embedded fonts. Download the file as Original or SVG and open it in any text editor, or paste the same Base64 into Base64 decode to see the XML as text straight away.
Raster to SVG is a wrapper, not vectorisation
If the Base64 data is a PNG, JPEG or another bitmap, choosing SVG produces an SVG file that contains the original pixels in an <image> element. It is useful when a tool only accepts SVG files, but it does not trace the picture into shapes: the image still blurs when enlarged, and the file is larger than the bitmap because the pixels are stored as Base64 inside it. For real vector paths, use tracing software such as Potrace or the Trace Bitmap feature in Inkscape.
Handling untrusted SVG
SVG can contain <script> elements, event handler attributes and links to external resources. Browsers block all of these when an SVG is shown as an image, through an <img> tag or a CSS background. Scripts can run and external resources can load when the file is opened directly in a browser tab or its markup is pasted inline into a page. Review or sanitise SVG from unknown sources before using it that way.
Frequently asked questions
Can this turn a PNG into a real vector SVG?
No. Converting a bitmap to SVG only embeds the image inside an SVG file. The result scales like the original bitmap, not like a vector drawing.
Why does my SVG data URI fail to decode?
;base64,. If not, the SVG is percent-encoded or raw text and is not Base64. The Data URI generator can parse it.Is it safe to decode an SVG from an unknown source?
Decoding and saving it is harmless, because the result is just text. Scripts inside an SVG can only run when it is opened as a document or inserted inline into a web page.
Why are fonts or linked images missing after converting an SVG to PNG?
To rasterize an SVG, the browser loads it as an image, and in that mode an SVG cannot fetch external files. Web fonts and linked pictures are skipped and default fonts are used instead. Embed fonts and images in the SVG to make it self-contained.