{
 "kind": "tool",
 "slug": "dompurify",
 "path": "tools/dompurify/",
 "name": "DOMPurify",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Auth and security libraries",
   "tools/auth-security/"
  ]
 ],
 "lead": "Fast XSS sanitizer for HTML, MathML and SVG protecting against injection attacks.",
 "chips": [
  {
   "label": "Auth and security libraries",
   "path": "tools/auth-security/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install dompurify"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/cure53/DOMPurify"
  },
  {
   "label": "Website",
   "href": "https://github.com/cure53/DOMPurify"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "(MPL-2.0 OR Apache-2.0)",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/cure53/DOMPurify"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 22, 2026. ",
   "src": "https://github.com/cure53/DOMPurify"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "101 projects",
   "status": "info",
   "sub": "#8 of 141 in its category",
   "note": "Dependency in 101 public GitHub projects set up for AI coding agents that we scanned (1.6%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What DOMPurify does",
   "parts": [
    {
     "t": "prose",
     "text": "Fast XSS sanitizer for HTML, MathML and SVG protecting against injection attacks."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "DOMPurify popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "77",
       "of": "/ 100",
       "l": "Gid Score, #152 overall"
      },
      {
       "n": "107M",
       "l": "downloads a week, npm"
      },
      {
       "n": "17.5K",
       "l": "GitHub stars"
      },
      {
       "n": "101",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How DOMPurify is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "68 projects, 2.1%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "51 projects, 1.7%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "37 projects, 1.5%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "16 projects, 3.4%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "11 projects, 3.2%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "10 projects, 2.1%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "10 projects, 3.6%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "7 projects, 5.0%",
       "v": "Kiro",
       "path": "agents/kiro/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 66.3% of its projects",
       "v": "Vite",
       "path": "tools/vite/"
      },
      {
       "l": "In 49.5% of its projects",
       "v": "jsdom",
       "path": "tools/jsdom/"
      },
      {
       "l": "In 77.2% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 44.6% of its projects",
       "v": "Testing Library",
       "path": "tools/testing-library/"
      },
      {
       "l": "In 76.2% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 57.4% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      },
      {
       "l": "In 76.2% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 52.5% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about DOMPurify",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/cure53",
        "7 GitHub sponsors"
       ]
      },
      {
       "title": "More in Auth and security libraries",
       "path": "tools/auth-security/",
       "items": [
        {
         "text": "bcryptjs",
         "path": "tools/bcryptjs/"
        },
        {
         "text": "NextAuth.js",
         "path": "tools/next-auth/"
        },
        {
         "text": "jsonwebtoken",
         "path": "tools/jsonwebtoken/"
        },
        {
         "text": "cryptography",
         "path": "tools/cryptography/"
        },
        {
         "text": "PyJWT",
         "path": "tools/pyjwt/"
        },
        {
         "text": "jose",
         "path": "tools/jose/"
        },
        {
         "text": "Better Auth",
         "path": "tools/better-auth/"
        },
        {
         "text": "Helmet",
         "path": "tools/helmet/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "DOMPurify",
       "me": true,
       "facts": [
        "(MPL-2.0 OR Apache-2.0)",
        "Gid 77",
        "107M/wk"
       ]
      }
     ],
     "more": "Compare DOMPurify with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install dompurify"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for DOMPurify yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm dompurify"
  ],
  [
   "Category",
   "Auth and security libraries"
  ],
  [
   "License",
   "(MPL-2.0 OR Apache-2.0)"
  ],
  [
   "Gid Score",
   "77.2"
  ],
  [
   "Rank in category",
   "#8 of 141"
  ],
  [
   "GitHub",
   "cure53/DOMPurify"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/cure53.png"
}