Tested tool guide
Tested browser tools
Checked August 16, 2026
What HTML Sanitizer Tester does, with a checked example
Paste an HTML fragment to see the markup DOMPurify returns after removing elements, attributes, and URL values that the selected allow lists do not permit. The controls let you test a policy for accepted tags, accepted attributes, and URLs instead of judging the original source by appearance alone. A common surprise is that permitting an element does not automatically permit every attribute or link value on it. Processing occurs in the browser, so potentially sensitive test markup is not uploaded.
Worked example
A concrete input and expected output from the current implementation.
Input
<p>Hello</p><script>alert(1)</script>
->
Expected output
<p>Hello</p>
Under DOMPurify's default sanitization policy, the paragraph is retained and the script element, including its JavaScript content, is removed. The surviving HTML therefore contains only the paragraph.