Skip to content
toolsdocks

Edit and optimize an SVG

Paste SVG code or open a file, edit the markup and compare the original with the optimized version. The size saving is shown before you download.

Runs on your device
Loading tool…

How to use

  1. Paste or open an SVG.
  2. Edit the code or the colour list; the preview updates.
  3. Optimize and compare sizes; export.

Worked example

The sample icon, a 3.8 KB Inkscape export with editor metadata and six-decimal coordinates, shrinks to 1.2 KB (−68 %) with the default settings.

Supported formats and limits

InputSVG
OutputSVG, PNG, Data URI
EngineSVGO (browser build); sanitized preview in a sandboxed frame

Limitations

  • Optimizing can rename or remove IDs used by external CSS or scripts; turn on Keep IDs if you rely on them.
  • The preview and PNG export do not load external files (linked images or fonts) referenced by the SVG.

Questions

How much smaller will my SVG get?

It depends on the file. Editor exports with metadata and long decimals shrink most: the sample icon, a 3.8 KB Inkscape export, drops to 1.2 KB (68% smaller) with the default settings. Lower number precision saves more but can shift shapes slightly.

Is it safe to preview an SVG from someone else?

The preview is sanitized and shown in a sandboxed frame: scripts and event handlers are removed and external links and files are not loaded. That protects this page, but review unknown SVGs before using them elsewhere.

Guides

Privacy

Runs on your device. Files and text are processed in this browser tab and are not uploaded.

See the privacy policy for how toolsdocks handles data.