FindSoftware

rehype

Plugin-based processor that transforms HTML as a syntax tree, part of the unified collective's ecosystem.

rehype is the HTML processor of the unified ecosystem. It adds support for HTML to unified: it parses HTML into a syntax tree, runs plugins that inspect and change that tree, and writes the result back out as HTML. The npm package combines the parser and the serializer with unified. The separate rehype-parse and rehype-stringify packages cover one half each, and rehype-cli inspects and formats HTML in scripts.

The package runs in Node.js and in Deno, and can be loaded in browsers from esm.sh. Plugins are separate packages, some kept by the rehype organization and others by outside authors.

Worth knowing

The package is ESM only. Improper use of HTML can open a site to cross-site scripting, and the README points to rehype-sanitize to make a tree safe. Plugins can open other attacks.

Identity

Status
Active
Maintainer
Titus Wormer5
First release
20166

Rendering and deploy

Install with
npm, cdn4

Releases

Current major version
137
Last release
2024-09-277

Adoption

GitHub stars
2,2612
npm downloads a week
4,913,5529
Contributors
468
Dependent repositories
9,92810
Dependent packages
26210

Why these figures do not compare

Sources

  1. 2026-11-16: links
    unifiedjs.com/
  2. 2026-11-16: links, Written in, License, GitHub stars
    api.github.com/repos/rehypejs/rehype
  3. 2026-11-16: Categories
    github.com/rehypejs/rehype/blob/main/readme.md
  4. 2026-11-16: Runtime, Install with, Minimum runtime
    github.com/rehypejs/rehype/blob/main/packages/rehype/readme.md
  5. 2026-11-16: Maintainer
    github.com/rehypejs/rehype/blob/main/license
  6. 2026-11-16: First release
    api.github.com/repos/rehypejs/rehype/commits/1.0.0
  7. 2026-11-16: Current major version, Last release
    github.com/rehypejs/rehype/releases/tag/13.0.2
  8. 2026-11-16: Contributors
    api.github.com/repos/rehypejs/rehype/contributors?per_page=1
  9. 2026-11-16: npm downloads a week
    api.npmjs.org/downloads/range/2026-11-01:2026-11-07/rehype
  10. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/rehype

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON