SVG Sanitizer
Clean your SVG.
Remove scripts and external links.
Remove scripts, event handlers and external links from an SVG. See everything that was removed, then download a clean copy.
Open your SVG- Import
- Mode
- Settings
- Download
Open your SVG
Choose a file or drop it here to get started.
How would you like to work?
Your SVG is ready
Your file is processed in your browser.
How it works
See exactly what was removed
The cleaning happens as soon as you open the file. The report lists each removed element, attribute and style, and the options also remove comments, animations or embedded images.
- Open your SVG, or try the example.
- Read the report and choose the options, then select Clean SVG.
- Review the clean SVG and download it.
SVGenic
Ready to make variations?
SVGenic turns the layers of one SVG into many variations: new colors, interchangeable layers or pixel art. Previews are free.
Remove active and external content from an SVG
An SVG file can carry more than a drawing: scripts, event handlers such as onclick, links to other sites and resources loaded from elsewhere. SVG Sanitizer keeps the elements and attributes that draw the image and removes the rest.
The cleaning follows an allow-list: shapes, groups, text, gradients, patterns, masks, filters and presentation styles are kept. Every removal is listed by name and count, so you can check the result before you download it.
- Clean an SVG before uploading it to a website or a shop.
- Remove editor data and unused attributes from an export.
- Check whether a file contains scripts or external links.
A few things to know
What does it remove?
Scripts, event handlers, links and resources pointing outside the file, unknown elements and attributes, editor data and style properties that do not draw the image. Embedded PNG, JPEG, GIF and WebP images are kept unless you remove them.
Does it change how my SVG looks?
Shapes, colors, gradients and filters stay as they are. A drawing that relied on an external font, image or stylesheet will look different, because those links are removed. Check the preview before you download.
Is the clean SVG ready to publish?
The cleaning leaves no script, event handler or external link in the file. If your website accepts SVG uploads from other people, keep checking those files on your server as well.
Where is my file processed?
Your SVG is cleaned in your browser. When usage statistics are configured, the tool sends its name and an export-request event.