How to use it
- 1
Paste SVG code or choose an .svg file.
- 2
Run optimization and compare the code size.
- 3
Download the optimized SVG.
What the tool can do
- Remove the XML declaration, DOCTYPE, comments, and metadata.
- Whitespace compaction between tags.
- Block script and foreignObject elements, inline event handlers, and javascript: URLs.
Common use cases
- Cleaning an SVG icon before publishing.
- Removing graphics-editor metadata.
- Checking SVG for blocked elements and event handlers.
How it works inside
The code is processed as text and is not inserted into the page as markup.
SVG containing scripts or other blocked active content is rejected.
Questions and answers
What does SVG optimisation do?
The tool cleans pasted SVG code using its supported rules and shows the result for copying. Compare the image's appearance after the change before replacing the file on your site.
Will the result always be smaller than the source?
Size depends on how the source was prepared. Basic cleanup does not replace every feature of a dedicated SVG optimiser. Processing runs in the browser; the tool does not upload code to your site or replace files automatically.
