SVG Editor
Clean scripts, events, and external resources in SVG, use SVGO to optimize size and report differences, and preview and download a safe copy.
How to use the SVG editor
SVG text is cleaned up, optimized, and previewed only in the current browser; it is not uploaded, nor does it actively request external resources.
Enter SVG
Paste content or load a SVG file of no more than 2 MiB, and choose whether to perform multiple rounds of optimization.
Safe cleanup and optimization
The tool first removes scripts, events, external resources, and dangerous elements, then optimizes with SVGO, and finally performs security cleanup again.
Review and download
View the original, cleaned, and optimized byte counts and removal statistics, then copy or download a safe copy after confirming the preview.
Limitations and Notes
- Safe cleanup actively removes scripts, foreignObject, event attributes, external references, and some styles; the appearance or behavior of SVG content that relies on these features will change.
- Optimization may rewrite paths, attributes, ID, and numeric precision, so it is not suitable as a lossless round trip when source structure, animation bindings, or editor metadata must be preserved.
- Browser preview passing does not mean SVG is consistent across all renderers; important graphics should be visually compared with the downloaded result and tested in the target environment.
FAQ
Why clean again after optimization?
This is to ensure that the final preview and download still meet security policies, and to prevent any conversion step from reintroducing prohibited structures.
Does multi-round optimization always make it smaller?
It usually reduces redundancy further, but takes longer and rewrites more; the report and visual comparison results should be used as the final reference.
Can graphic nodes be edited?
This tool is for source-code cleanup, optimization, and preview. It does not provide node-drag editing like vector drawing software.