A DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, SVG and MathML. It's also very simple to use and get started with. DOMPurify was started in February 2014 and, meanwhile, has reached version 2.3.0. DOMPurify is written in JavaScript and works in all modern browsers (Safari (10+), Opera (15+), Internet Explorer (10+), Edge, Firefox and Chrome - as well as almost anything else using Blink or WebKit). It doesn't break on MSIE6 or other legacy browsers. It either uses a fall-back or simply does nothing. Our automated tests cover 17 different browsers right now, more to come. We also cover Node.js v14.15.1, v15.4.0, running DOMPurify on jsdom. Older Node.js versions are known to work as well. DOMPurify is written by security people who have vast background in web attacks and XSS.

Features

  • DOMPurify sanitizes HTML and prevents XSS attacks
  • You can feed DOMPurify with string full of dirty HTML and it will return a string (unless configured otherwise) with clean HTML
  • DOMPurify will strip out everything that contains dangerous HTML
  • Prevents XSS attacks and other issues
  • The faster your browser, the faster DOMPurify will be
  • Just include DOMPurify on your website

Project Samples

Project Activity

See All Activity >

Categories

HTML/XHTML

License

Apache License V2.0, Mozilla Public License 2.0 (MPL 2.0)

Follow DOMPurify

DOMPurify Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DOMPurify!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML

Registered

2021-08-09