# [![unified][logo]][site] [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Size][size-badge]][size] [![Sponsors][sponsors-badge]][collective] [![Backers][backers-badge]][collective] [![Chat][chat-badge]][chat] **unified** is an interface for processing text using syntax trees. Itโ€™s what powers [**remark**][remark] (Markdown), [**retext**][retext] (natural language), and [**rehype**][rehype] (HTML), and allows for processing between formats. ## Intro **unified** enables new exciting projects like [Gatsby][] to pull in Markdown, [MDX][] to embed [JSX][], and [Prettier][] to format it. Itโ€™s used in about 700k projects on GitHub and has about 35m downloads each month on npm: youโ€™re probably using it. Some notable users are [Node.js][], [Vercel][], [Netlify][], [GitHub][], [Mozilla][], [WordPress][], [Adobe][], [Facebook][], [Google][], and many more. * To read about what we are up to, follow us [Twitter][] * For a less technical and more practical introduction to unified, visit [`unifiedjs.com`][site] and peruse its [Learn][] section * Browse [awesome unified][awesome] to find out more about the ecosystem * Questions? Get help on [Discussions][chat]! * Check out [Contribute][] below to find out how to help out, or become a backer or sponsor on [OpenCollective][collective] ## Sponsors Support this effort and give back by sponsoring on [OpenCollective][collective]!
Vercel

Motif

HashiCorp

American Express

GitBook

Gatsby

Netlify

Coinbase

ThemeIsle

Expo

Boost Note

Holloway


You?

## Install This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c): Node 12+ is needed to use it and it must be `import`ed instead of `require`d. [npm][]: ```sh npm install unified ``` ## Use ```js import {unified} from 'unified' import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import rehypeDocument from 'rehype-document' import rehypeFormat from 'rehype-format' import rehypeStringify from 'rehype-stringify' import {reporter} from 'vfile-reporter' unified() .use(remarkParse) .use(remarkRehype) .use(rehypeDocument, {title: '๐Ÿ‘‹๐ŸŒ'}) .use(rehypeFormat) .use(rehypeStringify) .process('# Hello world!') .then( (file) => { console.error(reporter(file)) console.log(String(file)) }, (error) => { // Handle your error here! throw error } ) ``` Yields: ```txt no issues found ``` ```html ๐Ÿ‘‹๐ŸŒ

Hello world!