remark is a markdown processor powered by plugins part of the unified collective. The project parses and compiles markdown, and lets programs process markdown without ever compiling to HTML (it can though). Powered by plugins to do all kinds of things: check markdown code style, add a table of contents, or compile to man pages.

View the project on GitHub or inspect the syntax tree on AST Explorer.


The Command Line Interface is powerful, it supports all settings the API provides and has built-in support for regenerating markdown files in a project according to a given style-guide, and emits warnings triggered by plugins in a beautiful fashion.

Say looks as follows:
* Hello


Now, by running remark in a terminal we’ll see the following:

remark --use remark-preset-lint-recommended
   1:3  warning  Incorrect list-item indent: add 2 spaces  list-item-indent
3:1-3:10  warning  Found reference to undefined definition   no-undefined-references

 2 warnings

Read more about the CLI in its readme.


The Application Programming Interface is the gist of remark and the CLI. It’s provided by unified so head to its API documentation for more info.

Say we have the following index.js file using remark, remark-preset-lint-markdown-style-guide, remark-html, and vfile-reporter:

import {reporter} from 'vfile-reporter'
import {remark} from 'remark'
import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'
import remarkHtml from 'remark-html'

  .process('*emphasis* and _importance_')
  .then((file) => {

Now, after installing dependencies and running index.js with Node, you’ll see the following:

npm install remark vfile-reporter remark-html remark-preset-lint-markdown-style-guide
├── remark@14.0.1
├── remark-html@14.0.0
├── remark-preset-lint-markdown-style-guide@5.0.0
└── vfile-reporter@7.0.1

node index.js
<p><em>emphasis</em> and <em>importance</em></p>
1:16-1:28  warning  Emphasis should use `*` as a marker  emphasis-marker

 1 warning


unified is an interface for processing text with syntax trees and transforming between them. Three syntaxes are connected to unified, each coming with a syntax tree definition, and a parser and stringifier: mdast with remark for markdown, nlcst with retext for prose, and hast with rehype for HTML.

unified also bridges between syntaxes, such as between markdown and HTML, as can be seen below:

import {unified} from 'unified'
import stream from 'unified-stream'
import remarkParse from 'remark-parse'
import remarkToc from 'remark-toc'
import remarkRehype from 'remark-rehype'
import rehypeDocument from 'rehype-document'
import rehypeFormat from 'rehype-format'
import rehypeStringify from 'rehype-stringify'

const input = '## Markdown'

  .use(rehypeDocument, {title: 'Contents'})
  .then((file) => {

View the unified project on GitHub or peruse the website.