Installation
Get started with markdown-parser by installing it with your preferred package manager.Requirements
markdown-parser requires Node.js 18 or higher.
Core parser
Install the coremarkdown-parser package to parse markdown into a structured AST:
MarkdownParserclass for parsing markdown text- Full TypeScript types for all block and inline nodes
- Streaming mode support for incremental parsing
- Zero dependencies (except for HTML entity decoding)
React integration
If you’re using React and want to render markdown with Server Components, install the React package:The
react-markdown-parser package has peer dependencies on react ^19.2.4 and react-dom ^19.2.4. It automatically includes markdown-parser as a dependency.Markdowncomponent for rendering markdown content- Customizable component overrides for all node types
- Server-only rendering (optimized for React Server Components)
- Type-safe component props
Verify installation
Verify the installation by checking the package version:TypeScript configuration
The packages are built with TypeScript and include type definitions out of the box. No additional@types packages are needed.
For the best experience, ensure your tsconfig.json includes:
tsconfig.json
Next steps
Quick start guide
Learn how to parse your first markdown document