Script Removal
Strip script tags and executable payloads that should never ship in decorative SVG.
SVG Tools / SVG Sanitizer
Free · Security · Private
Clean untrusted SVG by removing script tags, inline event handlers, and dangerous URLs. Sanitize assets before you embed them — entirely in your browser.
Run SVG Sanitizer entirely in your browser. Files stay on your device — nothing is uploaded to process this tool.
Launch SVG SanitizerFree accounts get 3 Collections. Organize icons from the library and your workflow, then unlock bulk export with Pro.
Reduce risk from third-party or user-uploaded vector files before they reach production.
Strip script tags and executable payloads that should never ship in decorative SVG.
Remove inline onclick-style handlers that can become XSS vectors.
Scrub risky href/xlink patterns so embeds stay safer by default.
Compare input and sanitized output so you know what was removed.
Confirm the graphic still looks right after security stripping.
Sanitization runs client-side — useful for confidential brand kits and internal assets.
Sanitize an SVG in three steps
Upload or paste markup from an external or user-generated source.
Review options and generate a cleaned version without dangerous constructs.
Copy or download the sanitized file before embedding it in your app.
Security questions about sanitizing SVG
SVG can contain scripts, event handlers, and risky URLs. Sanitizing reduces XSS risk before you embed third-party or user-uploaded vectors.
Sanitization targets dangerous constructs, not ordinary drawing elements. Always preview afterward to confirm the graphic still looks correct.
It is a practical client-side cleanup step, not a complete security audit. Keep using trusted sources and additional server-side checks where required.
No. Cleanup runs entirely in your browser. The original and sanitized markup stay on your device.