Skip to content
React Libraries
On this page

Handle untrusted input safely

Sanitize markup and work with password hashing or cryptographic formats.

Options for this task

bcrypt for Node.js

Library / tool

A Node.js binding for hashing and checking passwords with bcrypt.

Good for
Implementing password storage in a server-side authentication system.

DOMPurify

Library / tool

An HTML sanitizer that removes unsafe markup from untrusted content.

Good for
Rendering user-supplied HTML after applying an appropriate sanitization policy.

isomorphic-dompurify

Library / tool

A wrapper for using DOMPurify across browser and server environments.

Good for
Sharing HTML sanitization behavior between application layers.

PKI.js

Library / tool

JavaScript 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.

Browse sanitization & cryptography →

Explore more tasks →