# SVG Sanitizer: Clean Code from Figma and Illustrator
Paste any SVG exported from Figma, Adobe Illustrator or the browser inspector and get a clean, optimized vector file ready for production.# Why are exported SVGs so dirty?
When you export an SVG from Figma, you get a file loaded with attributes that only make sense inside the app:data-name, xml:space, references to internal layers and design metadata. The result is an SVG that can weigh 40-70% more than necessary.# What the Sanitizer removes
- Editor metadata:
metadata,titleanddesctags that Figma and Illustrator add automatically. - Inkscape namespaces: all elements with
inkscape:andsodipodi:prefix. - Unnecessary attributes:
xml:space,version, superfluousxmlns:*and Figmadata-*attributes. - Empty groups:
<g>elements with no content left as artifacts of deleted layers. - XML declarations: the
<?xml version="1.0"?>declaration and DOCTYPE unnecessary when embedding SVG in HTML.