FREE ONLINE TOOLCode & data

Conservative SVG optimizer

Clean supported SVG markup without changing its geometry

Parse static vector markup, remove comments and editor attributes, and optionally remove metadata. Geometry, IDs, viewBox values and visible text are retained.

  • No account needed
  • Practical guide included
  • Clear data boundaries
Conservative SVG optimizer
Private by design

Preparing your workspace…

Conservative SVG optimizer features and uses

Clean a self-contained static SVG without changing its drawing geometry. This conservative tool removes comments and editor attributes, with an optional metadata-removal choice. It is a small, inspectable cleanup step rather than a promise of maximum compression.

Inspect a copy of the original artwork before and after removing supported metadata or comments. This conservative optimizer is not a sanitizer, a full vector editor or a promise of the smallest possible SVG encoding.

Continue this task with SVG to PNG converter and Image compressor.

Common uses

  • Remove draft comments from a static icon.
  • Clean editor attributes before publishing vector artwork.
  • Review a smaller SVG while preserving its geometry.

How to use this tool

Follow these steps to prepare your input, run the tool and review its output.

  1. Paste supported static SVG

    Use self-contained vector markup. External resources, scripts, embedded images and animation are not accepted.

  2. Decide how to handle metadata

    Keep metadata when it contains attribution or license information. Choose removal only when you have checked the implications.

  3. Compare the cleaned result

    Generate the source, review its size and render it before replacing the original. Download only after checking appearance and licensing.

Example input and output

Remove a comment while retaining the rectangle.

Illustrative example
Starting input
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><!-- draft --><rect width="100" height="100" fill="#b8f34b"/></svg>
What to look for
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="#b8f34b"/></svg>

Illustrative equivalent markup. XML serialization can differ in whitespace and can occasionally make the file larger.

How to interpret the results

The tool retains geometry, IDs, viewBox values and visible text. It does not simplify paths, round coordinates or make design decisions.

Unsupported active or externally referenced content is rejected. Rejection is not a suggestion to remove a safety check or trust unknown SVG source.

Before you use the result

  • Preserve attribution and license metadata when required.
  • Review the rendered icon, not just its byte count.
  • Do not expect every valid SVG feature to be supported.

Frequently asked questions

Answers about using this tool, interpreting its results and how it handles your data.

How we handle your data
Will the tool simplify paths or round coordinates?

No. Cleanup is conservative and preserves drawing geometry. Path simplification and more aggressive optimization require a different, carefully reviewed workflow.

Why did the output become larger?

XML serialization can add or normalize markup. The tool reports actual input and output sizes instead of claiming that every cleanup saves bytes.

Does it safely strip scripts from arbitrary SVG files?

The tool rejects scripts, animation, embedded images, foreign content, external references and unsafe CSS. It does not promise to sanitize every arbitrary SVG into an accepted file.

Should I remove the metadata?

Only after reviewing it. Metadata may carry copyright, attribution or license information, so the default keeps it rather than treating every metadata block as disposable.

Is this tool free, and do I need to sign up?

This tool is free to use without an account or subscription. Supply your input in the workspace on this page, then run the tool. Your browser needs to support the features used by the tool; keep an original copy and review any generated output before applying it to a live website.

Are my files or text uploaded to your server?

This tool processes the supplied input locally in your browser. It does not upload your files or text to our server for processing. Copy or download the result you want to keep; the tool does not publish changes to your website automatically.