commonmark.js
JavaScript parser and renderer for CommonMark that turns Markdown into a syntax tree and renders it to HTML or XML.
commonmark.js is the JavaScript reference implementation of CommonMark, a specified form of Markdown. It parses a document into a syntax tree that code can inspect or change, and renders the tree to HTML or to an XML representation. The package is installed from npm, and a single-file distribution is available for client-side use.
Worth knowing
The library does not sanitize link attributes or raw HTML. For untrusted input, the README recommends its safe option or an HTML sanitizer on the output.
Identity
Rendering and deploy
- Install with
- npm5
Releases
Adoption
Sources
- 2026-11-04: links, Categories
github.com/commonmark/commonmark.js - 2026-11-04: Maintainer
raw.githubusercontent.com/commonmark/commonmark.js/master/LICENSE - 2026-11-04: First release
registry.npmjs.org/commonmark - 2026-11-04: Written in, GitHub stars
api.github.com/repos/commonmark/commonmark.js - 2026-11-04: Runtime, Install with
raw.githubusercontent.com/commonmark/commonmark.js/master/README.md - 2026-11-04: License, Current major version
registry.npmjs.org/commonmark/latest - 2026-11-04: Last release
github.com/commonmark/commonmark.js/releases/tag/0.31.2 - 2026-11-04: Contributors
api.github.com/repos/commonmark/commonmark.js/contributors - 2026-11-04: npm downloads a week
api.npmjs.org/downloads/range/2026-10-26:2026-11-01/commonmark - 2026-11-04: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/commonmark