Skip to content
toolstome

SVG optimizer

Shrink SVG icons, logos and illustrations before you put them on a website. Paste the code or open a file, and the optimizer removes what browsers don’t need: comments, the XML declaration, metadata, and the extra data that Inkscape, Sketch and Affinity save. It rounds long coordinates to the precision you choose and removes whitespace between tags, then shows the original and optimized images side by side so you can check nothing changed. Shapes and paths are never restructured.

Free · No sign-upProcessed in your browser

Coordinate precision

How to use the SVG Optimizer

  1. 1

    Add the SVG

    Paste the code or open an .svg file.

  2. 2

    Choose the precision

    Decimal places to keep in coordinates; 1 or 2 suits most icons.

  3. 3

    Pick what to remove

    Comments, metadata, editor data, declaration and whitespace.

  4. 4

    Compare and download

    Check the previews match, then copy or download.

When to use it

  • Clean icons exported from a design app before adding them to a site.
  • Reduce the size of an inline SVG logo.
  • Remove editor data before sharing a file.

Limits

  • Optimizations are deliberately conservative; dedicated build tools can merge paths and shapes for further savings.
  • Very low precision can visibly distort small, detailed artwork; compare the previews.
  • Files up to 10 MB.

Privacy

Your SVG is processed in your browser. Nothing is uploaded or stored.

Frequently asked questions

Will it change how my SVG looks?

It only removes data browsers ignore, rounds numbers and removes whitespace between tags outside text. Check the side-by-side preview, especially at precision 0.

What precision should I use?

Two decimal places is safe for most icons and logos. Large illustrations scaled up may need 3.

What is editor data?

Attributes and elements that Inkscape, Sodipodi, Sketch and Affinity add for their own use, such as layer names and grid settings.

Is the preview safe?

Yes. Previews are shown as images, and scripts inside an SVG never run in an image.

Why is spacing inside text kept?

Whitespace between words in text elements is visible, so it is never removed.

People also use

Last updated November 22, 2026 · How we build and test our tools

Categories

Recently used tools

Tools you open will appear here.

More