Skip to content
r.

DOMPurify

cure53/DOMPurify · Public GitHub repository

DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

DOMPurify live demo screenshot
Captured from the live demo · 2026-11-20

About this project

Author-written excerpt from the project README.

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG.

It's also very simple to use and get started with. DOMPurify was started in February 2014 and, meanwhile, has reached version v3.4.17.

DOMPurify runs as JavaScript and works in all modern browsers (Safari (10+), Opera (15+), Edge, Firefox and Chrome - as well as almost anything else using Blink, Gecko or WebKit). It doesn't break on MSIE or other legacy browsers. It simply does nothing.

Requirements and intended audience

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-11-01. Source: https://github.com/cure53/DOMPurify/blob/main/README.md

Recorded maintenance information

Last recorded source update: 2026-11-19. Saved release: 3.4.17 · 2026-10-12. These dates do not guarantee ongoing maintenance.

Technologies
JavaScript
Licence
Apache-2.0. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-20. This does not test every feature.

Browse related categories