SVG Optimizer

Clean and shrink an SVG (editor data, comments, long numbers, empty groups), remove unsafe parts, and export as file, data URI, CSS or React.

WebRuns in your browser

About this tool

Paste SVG code to make it smaller by removing comments, editor data, empty groups and extra decimals, then copy it as SVG, a data URI, a CSS background or a React component.

Scripts, event handlers, foreignObject and javascript: links are removed and listed, and the code is never added to this page as HTML. The preview is an image, where nothing runs. At most 1 MB is read.