rehype VS remark

Compare rehype vs remark and see what are their differences.


HTML processor powered by plugins part of the @unifiedjs collective (by rehypejs)


remark is a popular tool that transforms markdown with plugins. These plugins can inspect and change your markup. You can use remark on the server, the client, CLIs, deno, etc. (by remarkjs)
Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
rehype remark
3 16
846 4,854
3.8% 4.1%
7.1 7.7
24 days ago 5 days ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of rehype. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-13.


Posts with mentions or reviews of remark. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-05.
  • Tool to automatically enforce Markdown style/formatting
    3 projects | | 5 Jan 2022
    Right you are, "linter" helped me find this tool
  • If you're writing in Markdown, I recommend Rocket, an SSG that uses WebComponents!
    5 projects | | 24 Dec 2021
    As expected, HTML has been output. The next step is to generate a table of contents. In Hatena Blog, if you write the marker [:contents], the table of contents will be generated there. As a digression, there is a tool called remark that will convert the contents to Markdown.
  • Markdown editor for freedom!
    6 projects | | 21 Dec 2021
    🦾 Reliable - Built on top of prosemirror and remark
  • How I rebuilt my Angular blog and became an Astronaut 🚀
    10 projects | | 12 Oct 2021
    In Astro, markdown files are treated as plain text, and converted to HTML using remark with syntax highlighting done using Prism pre-enabled. In order to use the BlogPostLayout.astro in my markdown files, I had to add the layout property to the frontmatter in the markdown file. One example file looks like this:
  • How To Parse and Render Markdown In Vuejs
    6 projects | | 26 Aug 2021
    Vue does not have as much support for Vue as there is for React. Examples are markdown-it, Remark.js, marked.js. But hopefully in the future, there should be more support, and after much research, I picked marked.js because it has the most stars and has zero vulnerability. Marked does not sanitize (meaning it does not secure HTML documents from attacks like cross-site scripting (XSS) ) marked output HTML as that feature is deprecated and has vulnerability but however, it supports the use of other libraries to secure output HTML such as DOMPurify (recommended), sanitize-html or insane.
  • How to create a blog for your Next.js and ChakraUI website
    4 projects | | 31 Jul 2021
    Unified processor to parse and serialize Markdown - remark
  • How to Safely Render Markdown From a React Component
    7 projects | | 29 Jul 2021
    React markdown vs remark react-markdown is a library that provides the React component to render the Markdown markup while remark is a markdown preprocessor built on micromark. It inspects, parses and transforms markdowns.
  • Math Rendering Is Wrong
    7 projects | | 27 Jun 2021
    This article is odd. I use pre-rendered KaTeX with remark [1], plus their stylesheet on the client side. All of the article seems more specific to MathJax than the title seems to convey.


  • How I Built An Incomplete CMS
    4 projects | | 23 Jun 2021
    I began building a blog application for a site that I may or may not finish. The bulk of the project is based on the blog-starter-typescript example in the NextJs GitHub repo. Their example loads markdown files from a folder in the root directory and uses remark and gray-matter to convert the markdown into html and to get file metadata. The example code for these function is located in their lib folder as api.ts and markdownToHtml.ts.
  • markdown : importing files + toc generation
    5 projects | | 4 May 2021

What are some alternatives?

When comparing rehype and remark you can also consider the following projects:

markdown-it - Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed

marked - A markdown parser and compiler. Built for speed.

react-markdown - Markdown component for React

fast-xml-parser - Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.

gray-matter - Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author:

xlsx-populate - Excel XLSX parser/generator written in JavaScript with Node.js and browser support, jQuery/d3-style method chaining, encryption, and a focus on keeping existing workbook features and styles in tact.


github-markdown-toc - Easy TOC creation for GitHub

nextjs-prism-markdown - Example using Prism / Markdown with Next.js including switching syntax highlighting themes.

URI.js - Javascript URL mutation library

next-mdx-remote - Load mdx content from anywhere through getStaticProps in next.js

KaTeX - Fast math typesetting for the web.