Skip to content
SVGtoReact

SVGO in the browser

SVG Optimizer

Paste or upload an SVG and download a smaller file. Optimization uses the same SVGO preset as the converter's Optimize switch, with multipass on. viewBox stays, and the file never leaves this tab.

Optimizer

Runs in your browser. Your SVG is not uploaded.

Waiting for an SVG

Limit 500 KB and 10,000 elements. viewBox is kept. Scripts and external URLs are removed.

Optimized SVG

Optimized SVG will appear here.

What the optimizer changes

SVGO parses the SVG and prints it again. Metadata, comments, and unused editor namespaces go away. Paths can get shorter. The viewBox attribute is kept, including when width and height are also set. Solid colors stay as they are. currentColor is not applied on this page.

Need a React component instead? Use the converter, or the dedicated JSX and TSX pages. Their Optimize switch is still off until you turn it on.

Limits

  • 500 KB per SVG. Larger files are rejected and are not optimized.
  • 10,000 elements. A larger tree is rejected.
  • The SVG is sanitized before SVGO runs and again before it is shown or downloaded.
  • Malformed XML, a document type, or an entity declaration is rejected.

Questions

Is my SVG uploaded?

No. SVGO and the sanitizer run in this browser tab. The SVG is not sent to a server, saved in a database, or sent to analytics. Copy and download stay on your device. Closing the tab discards the file.

Does optimization keep the viewBox?

Yes. The optimizer uses SVGO's default preset with multipass, which removes metadata, comments, and editor markup and shortens paths. viewBox stays. Colors are not rewritten to currentColor. That switch is on the React converter and remains off unless you turn it on there.

What is removed before I can download?

The same sanitizer as the converter runs before and after SVGO. Scripts, event handlers, embedded HTML, and external URLs are removed. A file that is not valid SVG, is over 500 KB, or has more than 10,000 elements is rejected. The page does not offer the original unsanitized markup as the download.

How do I turn the result into a React component?

Copy or download the optimized SVG, then paste it into the converter. The converter's Optimize switch is separate and still off by default, so a second pass only happens if you enable it.