Run your Python code to see output here
Bleach is Mozilla’s well-maintained HTML sanitization library built on top of html5lib. It strips or escapes malicious markup, enforces safe allowlists for tags/attributes, filters CSS, and neutralizes scripts to keep user-generated content safe inside templates, blogs, forums, or CMS systems.
This compiler ships Bleach directly in the browser so you can test sanitization policies without a local server. Paste HTML, tweak allowed tags or attributes, register linkify callbacks, and compare cleaned vs. raw output instantly. It’s a handy sandbox for validating WYSIWYG inputs, Markdown converters, or API payloads before deploying rules into production. You can also upload and use files or folders directly in your code for HTML sanitization and content processing workflows. This compiler is online and completely free to use.
We’ve included examples demonstrating default cleaning, custom allowlists, CSS filtering, linkifying plain text, building custom callbacks, and safely embedding user content. Use them to harden comment sections, preview moderation filters, or teach security concepts around untrusted HTML.
Specialized Online Python compiler powered by Pyodide WebAssembly. Run Python Library directly in your browser with zero setup.