Handle untrusted input safely
Sanitize markup and work with password hashing or cryptographic formats.
Options for this task
bcrypt for Node.js
Library / toolA Node.js binding for hashing and checking passwords with bcrypt.
- Good for
- Implementing password storage in a server-side authentication system.
DOMPurify
Library / toolAn HTML sanitizer that removes unsafe markup from untrusted content.
- Good for
- Rendering user-supplied HTML after applying an appropriate sanitization policy.
isomorphic-dompurify
Library / toolA wrapper for using DOMPurify across browser and server environments.
- Good for
- Sharing HTML sanitization behavior between application layers.
PKI.js
Library / toolJavaScript tools for working with public-key infrastructure formats.
- Good for
- Processing certificates and cryptographic structures with Web Crypto integration.
Before you decide
Try a small, realistic example. Check the runtime, accessibility, maintenance, and license requirements for the features you need.