1001Ferramentas
Dev

SVG Optimizer

Reduce SVG file size by removing metadata, comments, editor attributes (Inkscape, Illustrator) and unnecessary whitespace. Processed in your browser.

O que é removido

  • Comentários HTML/XML (<!-- ... -->)
  • Elementos de metadados (<metadata>, <title>, <desc>)
  • Declaração XML (<?xml ... ?>)
  • Atributos de editores: inkscape:*, sodipodi:*, sketch:*, xmlns:xlink não utilizado
  • Espaços em branco, quebras de linha e indentação desnecessárias

Strip editor bloat without touching the artwork

SVGs exported from Inkscape, Illustrator or Figma ship with baggage the browser never uses: RDF metadata, comments, inkscape: and sodipodi: attributes, indentation. That weight goes to production with every icon on your site. Paste the code (or load the file), tick what you want removed and see before and after side by side, with byte sizes and the percentage saved. Then copy the result or download the cleaned file.

The cleanup is deliberately conservative: out go the XML declaration, the DOCTYPE, comments, the metadata, title and desc elements, editor namespaces and attributes (Inkscape, Sodipodi, Sketch) and the whitespace between tags. The artwork itself is untouched: no path rewriting, no coordinate rounding, no shape merging, which is what an aggressive optimizer like SVGO does. The sizes shown are real UTF-8 bytes, not character counts.

Check the output before shipping: paste the optimized SVG into a browser tab and confirm it renders the same. Two things to watch: the title element is what screen readers announce, so leave the metadata option unchecked for icons that need accessibility; and if the file relies on xlink:href references (common in older sprites), the editor-attribute cleanup removes the xlink namespace and can break them. Everything runs in your browser; the file is never uploaded.

Frequently asked questions

Does this replace SVGO?
No. SVGO rewrites the drawing itself (shortens paths, rounds coordinates); this tool only strips metadata, comments, editor attributes and whitespace. For files straight out of Inkscape or Illustrator, that alone cuts a lot.
Can the cleanup break my SVG?
In two cases, yes: files that depend on xlink:href (the editor-attribute option removes the xlink namespace) and icons that need their title element for accessibility. Untick the relevant option and compare the output.
Is my file uploaded anywhere?
No. The cleanup runs in JavaScript on the page itself; the content only leaves your machine when you copy or download the result.

Related Tools