Remove XML Declaration From SVG

Drop the <?xml …?> prolog so the file is safe to inline

Clean Illustrator SVG? Clean Illustrator SVGClean Figma SVG? Clean Figma SVG

FAQ

Quick answers

How do I remove the XML declaration from an SVG?
Paste markup that starts with <?xml and click Remove XML declaration. The prolog is deleted; the <svg> root stays.
Why remove an XML declaration before inlining SVG in HTML?
HTML parsers treat <?xml as unexpected. Stripping it avoids quirks when you paste SVG into a page.
Does this also remove Adobe or Figma junk?
No. Use Clean Illustrator SVG or Clean Figma SVG for exporter metadata.
Is the XML declaration required for a valid .svg file?
Not for browsers. viewBox and xmlns matter more. A standalone file can omit the prolog.
Clean Illustrator SVG → Clean Figma SVG → Remove hidden layers → Remove empty attributes →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina