Coastal morning

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

  1. 1Paste SVG source and choose safe cleanup options.
  2. 2Review size reduction and copy or download the cleaned SVG.
  3. 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.

Review size reduction and copy or download the cleaned SVG.

FAQ

Questions about the svg optimizer

Practical details about using the tool and understanding its result.

Keep working

From 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.

See Draftroom with your project