Base64 → SVG

Decode a Base64 string back to SVG

The reverse operation: take a data URI you have found in a stylesheet or an HTML attribute and recover the original SVG markup so you can read, edit or re-export it. Useful when you inherit a codebase full of inlined icons and need to work out what they actually are.

How to use it

  1. Paste the Base64 string or the full data URI. The data:image/svg+xml prefix is handled automatically.
  2. Decode to recover the original markup.
  3. Review the rendered preview to confirm you have the right image.
  4. Copy the SVG out, or beautify it first if it arrived minified.

Frequently asked questions

Do I need to strip the data URI prefix first?

No. You can paste the whole thing including data:image/svg+xml;base64, and the prefix is detected and removed.

Decoding failed. What went wrong?

Usually the string was truncated during copying, or it is URL-encoded rather than Base64-encoded. URL-encoded SVG data URIs contain readable fragments such as %3Csvg, which means they need decoding a different way.

The output is one long unreadable line.

That is normal, since inlined SVG is usually minified. Run it through the SVG Beautifier to restore indentation.

Is it safe to decode SVG from somewhere I do not trust?

Decoding itself is harmless, since it only turns characters back into text. Treat the result with care before using it, because SVG can contain script elements and event handlers. Read the markup rather than dropping it straight into a page.