Free · private · in your browser

SVG Optimizer

Clean up and minify SVG files. Strip comments, editor metadata and unnecessary whitespace, and ship lean SVGs that load faster.

Optimize your SVG

Paste SVG code or upload a .svg file, pick your options, then copy or download the result.

Paste the raw SVG markup, or upload a .svg file below.

Upload a .svg file

Drop a .svg here

or

Optimization options

How it works

  1. Add your SVG

    Paste the markup from your editor, or drop a .svg file onto the box.

  2. Tune the options

    Pick what to strip: comments, the XML declaration, metadata and editor namespaces — and rounding.

  3. Copy or download

    Watch the size go down, then copy the code or grab the optimized .svg file.

Frequently asked questions

What does this SVG optimizer remove?

It removes XML comments, the <?xml ?> declaration, <metadata> blocks, editor-only namespaces (inkscape, sodipodi, office) and extra whitespace, and can round decimal values to short coordinates.

Will the SVG still render the same?

Yes. Only information that doesn't affect the visible result is removed. The preview on this page re-renders your optimized file so you can check it in place.

Why is my SVG so big to begin with?

Editor tools like Inkscape and Illustrator sprinkle in metadata, comments and heavily indented whitespace. Cleaning those alone often cuts files by 20–60%.

Is the optimization safe for scripts?

Optimization never executes any code — the tool only parses and rewrites XML statements. Security is strict: the preview is rendered from the SVG as a static image, never injected as live HTML.

Does it work offline?

Yes. Every step runs locally in your browser, so your SVG never leaves your device and the tool works even with no connection.