# js-xss

Node.js and browser module that sanitizes untrusted HTML against a whitelist of tags and attributes to prevent cross-site scripting.


Source: https://findsoftware.frbit.cloud/js-xss/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- home: https://jsxss.com/
- repository: https://github.com/leizongmin/js-xss
- docs: https://jsxss.com/en/starter/quickstart.html

### Identity

- status: active
- maintainer: Zongmin Lei
- maintainerType: individual
- parent: unknown
- firstRelease: 2012
- hqCountry: unknown

### Kind

- category: library
- hosting: node
- language: javascript
- runtime: node
- runtimeMin: node 0.10
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: not applicable
- renderingModes: not applicable
- installMethod: npm, bower

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 1
- latestReleaseDate: 2026-10-24

### Adoption

- githubStargazers: 5312
- packagistDownloads: not applicable
- npmWeeklyDownloads: 7468135
- contributors: 38
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 111112
- dependentPackages: 899

### Sources

- urls: https://jsxss.com/en/index.html (read 2026-11-16)
- urls: https://jsxss.com/en/starter/quickstart.html (read 2026-11-16)
- urls: https://api.github.com/repos/leizongmin/js-xss (read 2026-11-16)
- maintainer: https://github.com/leizongmin/js-xss/blob/master/LICENSE (read 2026-11-16)
- category: https://github.com/leizongmin/js-xss/blob/master/README.md (read 2026-11-16)
- language: https://registry.npmjs.org/xss/latest (read 2026-11-16)
- runtime: https://registry.npmjs.org/xss/latest (read 2026-11-16)
- runtimeMin: https://registry.npmjs.org/xss/latest (read 2026-11-16)
- installMethod: https://github.com/leizongmin/js-xss/blob/master/README.md (read 2026-11-16)
- installMethod: https://github.com/leizongmin/js-xss/blob/master/README.md (read 2026-11-16)
- license: https://github.com/leizongmin/js-xss/blob/master/LICENSE (read 2026-11-16)
- licenseModel: https://github.com/leizongmin/js-xss/blob/master/LICENSE (read 2026-11-16)
- currentMajor: https://registry.npmjs.org/xss/latest (read 2026-11-16)
- latestReleaseDate: https://registry.npmjs.org/xss (read 2026-11-16)
- firstRelease: https://registry.npmjs.org/xss (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/leizongmin/js-xss (read 2026-11-16)
- contributors: https://api.github.com/repos/leizongmin/js-xss/contributors?per_page=1 (read 2026-11-16)
- npmWeeklyDownloads: https://api.npmjs.org/downloads/range/2026-11-08:2026-11-14/xss (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/xss (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/xss (read 2026-11-16)

## Notes

js-xss sanitizes untrusted HTML against a whitelist of tags and attributes to prevent cross-site scripting. The site documents its use on Node.js and in the browser, and a command-line tool for processing files.

## Worth knowing

When the whitelist allows the `style` attribute, its value is processed by the separate cssfilter module, which has its own default whitelist.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
