Remove editor metadata, comments and unsafe elements from an SVG, then format or minify what is left. Previewed in a sandboxed frame, never executed.
Waiting for an SVG
Every file is sanitised before anything else happens. The preview runs in a sandboxed frame with scripting disabled.
Nothing to preview yet.
The result appears here.Rounding path numbers is the single biggest saving in a real icon and the one that can visibly deform it. Watch the preview as you lower this.
SVG Optimizer runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
An SVG exported from a design tool is mostly not the drawing. Editor namespaces, generator comments, an embedded colour profile, empty groups left behind by a boolean operation, and ids no one references routinely make up more of the file than the paths do. Removing them changes nothing visible and often halves the file.
SVG is not image data, and this is the part most people get wrong about it. It is a document that can contain `<script>`, event handler attributes, `<foreignObject>` with arbitrary HTML inside it, and references to external URLs — which is why an SVG upload field that trusts its input is a cross-site scripting hole rather than an image field. Everything of that kind is removed here, by allowlist: an element or attribute is kept only if it is on the list, so a construct nobody anticipated is dropped rather than passed through.
What is removed is listed explicitly, not summarised. Scripts and event handlers, external references, `foreignObject`, and anything outside the allowed set are reported with counts, so you can see what the file was carrying before you decide to trust it. If removing it changed the drawing, you will see that in the preview and know why.
The preview itself runs inside a sandboxed iframe with no permissions at all, which is a second independent defence behind the sanitiser. Sanitising is the primary protection; the sandbox is what stands between you and the bug in the sanitiser that nobody has found yet. Nothing is uploaded — the file is parsed in the page, which is what makes it safe to check an SVG you do not trust.
That is what this is for. The markup is parsed as text, never executed, and sanitised by allowlist before anything is rendered — and the preview itself runs in a sandboxed iframe with no permissions, so even a flaw in the sanitiser has nowhere to go.
Because it is a document rather than image data. An SVG can contain script elements, inline event handlers, foreignObject with HTML inside it, and references to external URLs. An upload field that treats SVG as a picture and serves it back is a cross-site scripting hole.
Anything not on the allowlist: script elements, every on* handler attribute, foreignObject, external href and url() references, editor metadata and namespaces, comments, and empty groups. An allowlist means an unfamiliar construct is dropped rather than assumed harmless.
It can, if the drawing genuinely depended on something removed — most often an external font or an embedded script-driven animation. The preview shows the sanitised result, so you see the change rather than discovering it later.
Exports from design tools commonly drop by a third to a half, almost entirely from metadata and empty groups. A hand-written SVG that is already tidy may barely change, which the byte counts will tell you honestly.
No. Path coordinates are left exactly as they are. Rewriting them is where optimisers risk visible changes, and the gains here come from removing things that were never part of the drawing.