SVG Optimizer
Minify and Clean Up SVG Code
Paste your SVG code below to remove comments, metadata, editor namespaces, and unnecessary whitespace.
Preview
About SVG Optimization
SVG files exported from vector editors such as Inkscape, Illustrator, or Figma often contain extra data that is not needed to display the image. This includes XML comments, editor metadata, custom namespaces, hidden layers, and overly precise coordinate numbers. Stripping this content reduces file size, which means faster page loads and cleaner markup.
This optimizer works entirely in your browser. It removes comments, the <metadata> element, editor-specific namespaces like inkscape: and sodipodi:, collapses whitespace between tags, trims trailing zeros from numbers, and deletes empty attributes. Removing <title> and <desc> is optional, since those elements improve accessibility and should be kept when the SVG is content rather than decoration. Learn more in the SVG Tutorial.