Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

rehype-sanitize

rehype plugin to sanitize HTML and prevent XSS attacks in content.

Markdown, editors and contentNPM

GitHubWebsite

1. License

License from npm.

github.com/rehypejs/rehype-sanitize

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What rehype-sanitize does

rehype plugin to sanitize HTML and prevent XSS attacks in content.

rehype-sanitize popularity

58 / 100
Gid Score, #1199 overall
24.8M
downloads a week, npm
224
GitHub stars
36
agent projects use it
rehype-sanitize: downloads per weeknpm, rehype-sanitize 24,816,530
rehype-sanitize: GitHub starsrehypejs/rehype-sanitize 224

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How rehype-sanitize is used

  • rehype-sanitize is a dependency in 36 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (0.7% of the 4,867 JavaScript/TypeScript ones), #25 of 149 in markdown, editors and content.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 96; those are left out of every share on this page.
  • Projects that use it most often also use react-markdown (80.6%), remark-gfm (80.6%), Lucide React (75.0%).

By coding agent

18 projects, 0.5%
16 projects, 0.5%
16 projects, 0.7%

Often used with

In 80.6% of its projects
In 80.6% of its projects
In 75.0% of its projects
In 94.4% of its projects
In 69.4% of its projects
In 66.7% of its projects
In 86.1% of its projects
In 55.6% of its projects

More about rehype-sanitize

Funding
  • GitHub Sponsors: https://github.com/unifiedjs
  • Open Collective: https://opencollective.com/unified
  • thanks.dev: https://thanks.dev/u/gh/rehypejs
  • 25 GitHub sponsors

See all

More in Markdown, editors and content

Alternatives

rehype-sanitize This page

MITGid 5824.8M/wk

Compare rehype-sanitize with another tool

Get started

Install it.

npm install rehype-sanitize

No step-by-step start for rehype-sanitize yet: we have not written its hand-checked card.