This tool removes JavaScript from your HTML content, ensuring that your pages are free from potentially harmful or unwanted scripts. It allows you to choose whether to strip out only embedded "script" tags, eliminate inline JavaScript such as event handlers and "javascript:" URIs, or remove all JavaScript altogether.
Examples:
Remove <script> Tags Only
Removes all <script> blocks and their content.
Before:
<p>Hello</p> <script> alert("This is a script!"); </script> <p>World</p>
After:
<p>Hello</p> <p>World</p>
Remove Inline JavaScript Only
Removes inline JavaScript by stripping out event handlers and attributes with "javascript:" values.
Before:
<a href="javascript:alert('Hi!')" onclick="doSomething()">Click me</a>
After:
<a>Click me</a>
Remove All JavaScript
Removes both <script> blocks and inline JavaScript.
Before:
<p>Hello</p> <script> alert("Script content"); </script> <a href="javascript:doSomething()" onclick="doSomethingElse()">Test</a>
After:
<p>Hello</p> <a>Test</a>