About this tool

The SVG Viewer and Optimizer renders pasted SVG markup as a live preview and minifies it by removing the XML declaration, comments, title, desc and metadata elements and extra whitespace, showing the size saved.

How to use it

  1. Paste your SVG code into the input box.
  2. Check the live preview.
  3. Click Optimize SVG to minify it and see the size reduction.
  4. Copy the output or download it as an .svg file.

Good to know

  • Editors such as Illustrator and Inkscape often add comments, metadata and whitespace that browsers do not need.
  • Removing this markup typically makes an SVG noticeably smaller without changing how it looks.
  • This optimizer removes title and desc elements; keep a title if the SVG needs an accessible name.
  • The preview renders the SVG as an image, so scripts inside the file do not run.
  • SVG files compress well with gzip or Brotli on your web server.

Runs entirely in your browser — nothing you enter is uploaded or stored.

Frequently asked questions

How do I view an SVG file?

Open it in any modern browser, or paste its code here to see a preview instantly.

How do I reduce SVG file size?

Remove editor metadata, comments and unneeded whitespace, which is what Optimize SVG does. For deeper savings, a tool like SVGO can also simplify paths.

Is it safe to paste SVG code here?

Yes. The SVG is processed and previewed in your browser only, and it is displayed as an image so embedded scripts do not execute.

Will optimizing change how my SVG looks?

No. Only non-visual content such as comments, metadata and whitespace is removed; shapes and colors stay the same.