Smaller vectors, cleaner markup

SVG Optimizer

Validate and reduce SVG source using DOM-aware cleanup instead of risky global replacements, with an optional active-content security pass.

DOM-basedSafe previewPrivate in browser
Drop an SVG here or choose a fileMaximum 2 MB · or paste SVG source below
0 characters
Optimized SVG
Conservative optimization

Avoid appearance-changing shortcuts

The optimizer does not blindly delete attributes such as fill="black" or stroke="none", because inheritance and CSS can make those values meaningful.

Security

SVG can contain active content

SVG may include scripts, event handlers, external resources and foreign HTML. Keep security cleanup enabled before previewing or embedding untrusted files.

Precision

Rounding trades size for fidelity

Reducing decimal precision can slightly alter complex curves, filters and transforms. Compare the optimized artwork at its intended display size.

SVG optimization checklist

  1. Load or paste a complete SVG document.
  2. Keep security cleanup enabled for files you did not create.
  3. Select metadata, editor-data and numeric precision options.
  4. Optimize, inspect the preview and size statistics, then download.

SVG optimizer FAQ

Is this a complete sanitizer?

No browser-only sanitizer can guarantee safety in every embedding context. The security pass removes common active vectors, but serve untrusted SVG as a download or rasterize it for high-risk use cases.

Why is preview disabled without security cleanup?

Rendering untrusted SVG can initiate external requests or active behavior depending on browser and embedding context, so this tool previews only cleaned output.

When is usage counted?

One usage is recorded when you press Optimize SVG. Loading, editing, copying and downloading do not add uses.