Awesome Open Source
Awesome Open Source


Build Coverage Downloads Size Sponsors Backers Chat

rehype is an HTML processor powered by plugins part of the unified collective.


rehype is an ecosystem of plugins for processing HTML to do all kinds of things: format it, minify it, or wrap it programmatically into a document.

This repository contains the following projects:

  • rehype-parse — Parse HTML documents to syntax trees
  • rehype-stringify — Serialize syntax trees to HTML documents
  • rehype — Programmatic interface with both rehype-parse and rehype-stringify
  • rehype-cli — Command-line interface wrapping rehype


Support this effort and give back by sponsoring on OpenCollective!

Gatsby 🥇

Vercel 🥇




Boost Hub




As rehype works on HTML, and improper use of HTML can open you up to a cross-site scripting (XSS) attack, use of rehype can also be unsafe. Use rehype-sanitize to make the tree safe.


See in rehypejs/.github for ways to get started. See for ways to get help. Ideas for new plugins and tools can be posted in rehypejs/ideas.

A curated list of awesome rehype resources can be found in awesome rehype.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.


MIT © Titus Wormer

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (70,419
html (11,183
ast (167
unified (16