xmltoolskit.org
XML utilities, in the browser
Say hi →

SVG Optimizer

updated 20 November 2026 · SVGO 4.1.0 · runs in your browser

An SVG saved from Inkscape, Illustrator, Figma or Sketch carries the editor's own bookkeeping — layer names, guide positions, RDF licence blocks, coordinates to six decimal places. This page runs SVGO, the standard SVG optimiser, on your file without it leaving the browser, and shows the result next to the original so you can see that nothing visible changed.

svgo
Drop .svg files here, or
ready

SVG Optimizer

Paste the markup or drop a file and the optimised version appears on the right, with the byte count before and after and both versions rendered underneath. Drop several files at once and each is optimised with the same settings; the table lists every file's saving, and Download all packs them into one zip.

How to use it

  1. Paste SVG markup, or drop one or more .svg files on the left pane.
  2. Compare the two renderings. The captions give the size each one renders at; if they differ, the status line says so.
  3. Adjust the options — every change re-runs the optimisation.
  4. Copy the result, download it, or download all files as a zip.

What the optimiser does

It runs SVGO's default preset, a fixed sequence of 34 plugins. Among them: removing the doctype, the XML declaration, comments, <metadata> and editor namespaces; collapsing useless groups; turning simple shapes into shorter path data; rewriting path commands in their shortest relative or absolute form; rounding numbers; shortening colours; merging adjacent paths with identical styles; and dropping attributes that only restate a default.

The preview is safe to look at

An SVG file can contain <script> and event handlers, so a file from someone else is never inserted into this page. Both previews are ordinary <img> elements pointed at a temporary blob: URL — an SVG loaded as an image is not allowed to run scripts or load other resources. That is also why the preview can differ from how the same file looks when opened directly, if it depends on an external font or image.

What it will not do

FAQ

Is this the same SVGO as the command-line tool?

Yes — the svgo npm package's own browser build, version 4.1.0, loaded from jsDelivr. The default settings match npx svgo file.svg except multipass, which is switched on here.

Why did my icon change size after optimising?

Almost always a removed viewBox, or width/height that only made sense together with it. Keep keep viewBox ticked. The captions under the previews report the rendered size of both versions so you can see it immediately.

My CSS animation stopped working.

The animation probably targets an ID or a class that SVGO renamed or removed. Tick keep IDs and keep classes.

Is my file uploaded?

No. The SVGO library is downloaded once from cdn.jsdelivr.net; your files are read and optimised locally and never sent anywhere.

Related tools

Privacy

100% client-side. Files are optimised in your browser; nothing is uploaded. See the privacy policy.