HTML Sanitizer
Sanitize HTML to prevent XSS attacks
How to Use HTML Sanitizer
- Paste the HTML you want to clean.
- Choose a mode: Strict for text formatting only, Basic to allow links and common markup, Permissive to strip only scripts and event handlers.
- Review the threat counter and the cleaned output.
- Copy the sanitised HTML.
About HTML Sanitizer
What this page solves
Rendering user-submitted HTML — from a comment box, WYSIWYG editor, or Markdown import — without sanitizing is the top source of XSS on the web. This tool strips dangerous tags, attributes, and URLs client-side so you can preview exactly what your app will render.
HTML Sanitizer strips XSS-dangerous tags (`