SVG sanitizer

Runs in browser

Strip scripts, event handlers and unsafe URLs from SVG with an allowlist sanitizer.

or drag & drop
Unsafe content stripped3 removal(s)
  • • <script>
  • • rect@onclick
  • • a@href=javascript:alert(2)
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><rect width="10" height="10" fill="red"/><a><circle cx="5" cy="5" r="3"/></a></svg>

Related tools