perfect-express-sanitizer

JSON →
library 2.0.2 ·javascript
verified Jun 5, 2026

perfect-express-sanitizer is an Express.js middleware and utility library for sanitizing user input against Cross-Site Scripting (XSS), SQL injection, and NoSQL injection attacks. Version 2.0.2, released periodically, provides middleware to clean request body, query, and headers. It supports custom forbidden keywords and regular expressions, customizable cleanup levels, and can be used standalone for string sanitation. Unlike express-validator or helmet, this package focuses specifically on input sanitization with aggressive removal of malicious patterns, though it has limited documentation and may produce false positives.