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
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
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