📐 SVG Optimizer
Clean and compress your SVG files instantly in the browser — strips editor noise, metadata, and comments without touching your shapes or paths.
Paste SVG (or load a file)
About
SVG files exported from tools like Inkscape, Adobe Illustrator, or Figma often carry large amounts of invisible overhead: editor-specific namespaces (sodipodi:, inkscape:), metadata blocks, XML comments, and redundant whitespace. This tool parses your SVG with the browser's own DOM engine and surgically removes that overhead in a conservative way — it never alters coordinates, colors, or path data, so your graphic looks identical after optimization. You get a side-by-side size comparison and a live rendered preview so you can confirm nothing visual changed before downloading the cleaned file.
How to use
- Paste your SVG markup into the input box, or click Load File to open an .svg file from your device.
- Click Optimize to run the DOM-based cleaner, which strips comments, metadata, and Inkscape/Sodipodi editor elements.
- Review the before/after size comparison and inspect the live SVG preview to confirm the graphic is visually unchanged.
- Copy the optimized SVG code directly, or click Download to save the cleaned .svg file to your device.
FAQ
- Will the optimizer change how my SVG looks?
- No. The tool only removes invisible overhead — comments, metadata, and editor-specific elements — and collapses whitespace. Paths, shapes, colors, and transforms are never touched.
- What editor-specific junk does it remove?
- It removes Inkscape and Sodipodi namespace elements and attributes, RDF/Dublin Core metadata, XML comments, and unnecessary whitespace between tags — the most common sources of bloat in exported SVGs.
- Is my SVG code sent to a server?
- No. All parsing and cleaning happens entirely inside your browser using the DOM API. Your SVG code never leaves your device.
- How much file size can I expect to save?
- Savings vary by source. An Inkscape file with full metadata typically shrinks 10–40%. Files already exported lean may see only 2–5%. The tool shows you the exact byte count and percentage saved after each run.
- Can I use this on SVGs exported from Figma or Adobe Illustrator?
- Yes. The optimizer works on SVG from any source. Figma exports are already fairly clean, so savings are modest. Illustrator exports often include embedded fonts and ICC profiles that this conservative cleaner intentionally leaves intact.