Skip to content
React Libraries
On this page

DOMPurify

An HTML sanitizer that removes unsafe markup from untrusted content.

What it does

An HTML sanitizer that removes unsafe markup from untrusted content.

When it fits

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

Other options in this category

  • bcrypt for Node.js — Implementing password storage in a server-side authentication system.
  • isomorphic-dompurify — Sharing HTML sanitization behavior between application layers.
  • PKI.js — Processing certificates and cryptographic structures with Web Crypto integration.

Source

Project source for DOMPurify ↗

Editorial overview reviewed on October 24, 2026. Follow the source for current setup, compatibility, and licensing.

Handle untrusted input safely →

All sanitization & cryptography options →