# xss — card for AI agents

Sanitizes untrusted HTML to prevent XSS attacks using whitelist configuration.

Category: Auth and security libraries · npm package `xss` · latest version 1.0.17 (checked 2026-11-01)
Install: `npm install xss`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 60.1 (#1018 of all tools, 37 of 141 in its category)
- Used in 14 public projects set up for AI coding agents (0.2%)
- Downloads last week: 7,888,047 (as of 2026-11-24), +34.5% over 4 weeks
- GitHub stars: 5,311 (as of 2026-11-24)
- Last push: 2026-10-24

## Often used with
qrcode (JavaScript) 90.8%, ws 90.8%, OpenTelemetry 86.2%, Marked 84.6%, Axios 83.1%, Model Context Protocol SDK (JavaScript) 81.5%

## Checked alternatives (same job)
- DOMPurify: https://agentgid.com/tools/dompurify/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/xss/
- Homepage: https://github.com/leizongmin/js-xss
- Repository: https://github.com/leizongmin/js-xss

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
