10 Best JavaScript XSS Libraries

List hand-picked by Openbase Experts
Learn More

dom

dompurify

DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:

License Icon
License: (MPL-2.0 OR Apache-2.0)
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
5.0/ 5
2
Top Feedback
3Easy to Use
2Performant
GitHub Stars
8K
Weekly Downloads
2M
Last Commit
2mos ago

express-validator

An express.js middleware for validator.js.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.7/ 5
17
Top Feedback
12Easy to Use
11Great Documentation
9Performant
GitHub Stars
5K
Weekly Downloads
313K
Last Commit
1mo ago

x-xss-protection

Help secure Express apps with various HTTP headers

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
9K
Weekly Downloads
550K
Last Commit
2mos ago

helmet-csp

Help secure Express apps with various HTTP headers

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
9K
Weekly Downloads
548K
Last Commit
2mos ago
es

express-sanitizer

An express.js middleware for node-validator

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
44
Weekly Downloads
5K
Last Commit
9mos ago

xss-filters

Secure XSS Filters.

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
1K
Weekly Downloads
56K
Last Commit
5yrs ago

showdown-xss-filter

XSS filter for the Showdown markdown converter

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
30
Weekly Downloads
16K
Last Commit
6yrs ago
xc

xss-clean

Middleware to sanitize user input

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
48
Weekly Downloads
15K
Last Commit
6yrs ago

express-csp-generator

Content Security Policy Generator, Powered by RapidSec

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
1
Weekly Downloads
6
Last Commit
1yr ago

secure-filters

Anti-XSS Security Filters for EJS and More

License Icon
License: BSD-3-Clause
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
137
Weekly Downloads
638
Last Commit
5yrs ago
ep

ember-purify

Purify your html content before marking it safe

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
16
Weekly Downloads
609
Last Commit
2yrs ago
es

express-sanitized

An express.js middleware for sanitizing all query and body parameters automatically

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
5
Weekly Downloads
405
Last Commit
2yrs ago
xa

xss-advanced

Node.js Connect middleware to sanitize user input coming from POST body, GET queries, and url params. Works with Express

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
3
Weekly Downloads
362
Last Commit
1yr ago
np

node-procexss

Middleware to help to prevent xss attacks in your Express/Connect apps

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
5
Weekly Downloads
56
Last Commit
6yrs ago
xrs

xss-req-sanitizer

Middleware to sanitize http requests

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
50
Last Commit
N/A
xss

xsslint

Find potential XSS vulnerabilities

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
27
Weekly Downloads
1
Last Commit
2yrs ago