Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

DOMPurify

Fast XSS sanitizer for HTML, MathML and SVG protecting against injection attacks.

Auth and security librariesNPM

GitHubWebsite

1. License

License from npm.

github.com/cure53/DOMPurify

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What DOMPurify does

Fast XSS sanitizer for HTML, MathML and SVG protecting against injection attacks.

DOMPurify popularity

77 / 100
Gid Score, #152 overall
107M
downloads a week, npm
17.5K
GitHub stars
101
agent projects use it
DOMPurify: downloads per weeknpm, dompurify 106,785,063
DOMPurify: GitHub starscure53/DOMPurify 17,544

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How DOMPurify is used

  • DOMPurify is a dependency in 101 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (2.1% of the 4,867 JavaScript/TypeScript ones), #8 of 141 in auth and security libraries.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 278; those are left out of every share on this page.
  • Projects that use it most often also use Vite (66.3%), jsdom (49.5%), Tailwind CSS (77.2%).
  • It is more common in projects set up for Kiro (5.0%) than for Cursor (1.5%).

By coding agent

68 projects, 2.1%
51 projects, 1.7%
37 projects, 1.5%
16 projects, 3.4%
11 projects, 3.2%
10 projects, 2.1%
10 projects, 3.6%
7 projects, 5.0%

Often used with

In 66.3% of its projects
In 49.5% of its projects
In 77.2% of its projects
In 44.6% of its projects
In 76.2% of its projects
In 57.4% of its projects
In 76.2% of its projects
In 52.5% of its projects

More about DOMPurify

Funding
  • GitHub Sponsors: https://github.com/cure53
  • 7 GitHub sponsors

See all

More in Auth and security libraries

Alternatives

DOMPurify This page

(MPL-2.0 OR Apache-2.0)Gid 77107M/wk

Compare DOMPurify with another tool

Get started

Install it.

npm install dompurify

No step-by-step start for DOMPurify yet: we have not written its hand-checked card.