Skip to content

SVG Optimizer

Strip editor metadata, comments and excess precision from an SVG, with a live preview.

Runs in your browserNo account neededFree
Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the svg optimizer

  1. Paste your SVG markup.
  2. Choose what to strip.
  3. Check the preview, then copy or download.

About this tool

SVGs exported from design tools carry a great deal that browsers ignore: editor namespaces, layer names, comments, and coordinates given to a dozen decimal places. On icons that overhead frequently outweighs the artwork itself.

Decimal precision is usually the biggest win. A coordinate written to eight places describes a position far finer than any screen can show, and rounding to two typically cuts the file substantially with no visible difference.

Removing width and height is offered but off by default, and only applies when a viewBox is present. That combination lets an SVG scale to its container — but without a viewBox, removing them leaves the image with no intrinsic size at all, so the tool checks first.

This works on the markup as text rather than parsing it into a tree, so it performs only the changes that are safe without one. It will not merge paths, remove unused definitions or restructure groups the way a full optimiser such as SVGO does. A live preview is shown so you can confirm the result still renders.

Common uses

  • Shrinking icons exported from Figma or Illustrator.
  • Cleaning SVGs before inlining them in HTML.
  • Removing layer names and editor data before publishing.

Frequently asked questions

Will optimising break my SVG?
It should not — only changes safe without a full parse are made. The live preview is there so you can confirm before using the result.
Should I remove width and height?
Only when a viewBox is present; the tool enforces that. It lets the SVG scale to its container, but without a viewBox it would lose its size entirely.
How is this different from SVGO?
SVGO parses the document and can merge paths and drop unused definitions. This does the text-level cleanups, which cover most of the saving, without any upload.

Related tools