Free Web & UX Tools
SVG Optimizer & Sanitizer
Remove comments, metadata, scripts, event attributes, and redundant whitespace from pasted SVG markup.
What this tool does
The browser parses SVG as XML, removes clearly unsafe or unnecessary nodes and attributes, then serializes the result.
Remove comments, metadata, scripts, event attributes, and redundant whitespace from pasted SVG markup.
The browser parses SVG as XML, removes clearly unsafe or unnecessary nodes and attributes, then serializes the result.
Use the tool
Clean SVG markup locally
Paste SVG source and choose safe cleanup options.
Paste SVG markup
Optimized SVG appears here
Comments, metadata, event handlers, and redundant whitespace are removed conservatively.
How to use it
Three quick steps
- 1Paste SVG source and choose safe cleanup options.
- 2Review size reduction and copy or download the cleaned SVG.
- 3Verify the result in its real production context. This conservative optimizer does not perform every geometric optimization available in specialist build tools.
Worked example
Example: SVG Optimizer
Clean an exported icon before adding it to a web component library.
FAQ
Questions about the svg optimizer
Practical details about using the tool and understanding its result.
Keep working
Related tools
Favicon Generator
Turn a local image into five transparent PNG icon sizes and matching HTML tags.
Open toolImage Format Converter
Convert JPEG, PNG, and WebP images locally while preserving their pixel dimensions.
Open toolFile Hash Generator
Generate SHA-256, SHA-384, or SHA-512 checksums for a local file.
Open toolFrom one asset to the whole workflow
Keep this decision connected to the work, feedback, and final approval.
Draftroom keeps projects, creative files, feedback, revisions, and approvals connected in one workspace.