---
title: "DOMPurify"
description: "An HTML sanitizer that removes unsafe markup from untrusted content."
pagination: false
---

{/* Generated from content/. Edit the catalog, not this page. */}

<PurposeNote title="Good for">Rendering user-supplied HTML after applying an appropriate sanitization policy.</PurposeNote>

## 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

<div data-pagefind-ignore>

- [bcrypt for Node.js](/security/bcrypt-for-node-js) — Implementing password storage in a server-side authentication system.
- [isomorphic-dompurify](/security/isomorphic-dompurify) — Sharing HTML sanitization behavior between application layers.
- [PKI.js](/security/pki-js) — Processing certificates and cryptographic structures with Web Crypto integration.

</div>

## Source

[Project source for DOMPurify ↗](https://cure53.de/purify)

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

[Handle untrusted input safely →](/tasks/handle-untrusted-input-safely)

[All sanitization &amp; cryptography options →](/security)
