Skip to content
JS
Package

xss

Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist

v1.0.15, 3 Mar 2024MITCommonJSTypes: BundledSecurity
$ npm install xss

Key numbers

As of 25 Sept 2026
Weekly downloads
4.2m
+51% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
2
Direct, from package.json
Last release
2 years ago
v1.0.15
GitHub stars
5.3k
634 forks
Open issues / PRs
65 / 4
Contributors
-
Commits, last 52 weeks
5

Downloads

Last week 2026-09-15 to 2026-09-21
02m4m6mSept 2025Mar 2026Sept 2026High 5.9m (25 Aug 2026)Low 1.7m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

4,178,752 downloads last week, 20,741,341 in the last month. The 12-month change of +51% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
071 in total
Latest version
1.0.15, 3 Mar 20242 years ago
First published
19 Sept 2012
Last push to GitHub
6 May 2026141 days before the snapshot
Repository archived
No
Open issues
65
Open pull requests
4
Commits, last 52 weeks
5
Dependents on npm
1,534

Major versions

  1. v1 first release 1.0.0, 24 May 2018
  2. v0 first release 0.0.1, 19 Sept 2012

Recent releases

VersionPublished
1.0.153 Mar 2024
1.0.1416 Aug 2022
1.0.136 Jun 2022
1.0.123 Jun 2022
1.0.116 Mar 2022
1.0.108 Oct 2021
1.0.96 May 2021
1.0.827 Jul 2020
1.0.78 Jun 2020
1.0.621 Mar 2019
1.0.520 Mar 2019
1.0.420 Mar 2019
1.0.325 May 2018
1.0.225 May 2018
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>= 0.10.0
Runtimes
-
Unpacked size (npm)
142 kB
Dependencies (2)
commandercssfilter
npm install xss

CDN

jsDelivr: 390.5k requests in 30 days
  • jsDelivrhttps://cdn.jsdelivr.net/npm/xss@1.0.15/
  • unpkghttps://unpkg.com/xss@1.0.15/
  • esm.shhttps://esm.sh/xss@1.0.15
Sources: npm registry, npm downloads API, GitHub API, jsDelivr. Data fetched 25 Sept 2026.

Indexability: Indexed.