Turndown
JavaScript library that converts HTML into Markdown, for Node.js and in the browser.
mixmark-io.github.io/turndown/repository
Turndown reads HTML and writes Markdown, and takes either an HTML string or a DOM node as input. The demo page says it aims to be CommonMark compliant, and options cover heading style, bullet markers, code block fences, emphasis and link style.
Rules decide how each element converts. Added rules take precedence over the CommonMark rules, keep and remove filters choose which elements stay as HTML or disappear, and plugins bundle several rules together. The online demo shows a conversion on the project’s own page.
Worth knowing
Turndown escapes Markdown characters in text with backslashes, using a group of regular expressions. The README says the resulting escaping rules can be quite aggressive, and a developer who is confident in the escaping can override the escape method.
Identity
Rendering and deploy
- Install with
- npm5
Releases
Adoption
Sources
- 2026-11-16: links
mixmark-io.github.io/turndown/ - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/mixmark-io/turndown - 2026-11-16: First release
api.github.com/repos/mixmark-io/turndown/tags - 2026-11-16: Maintainer
raw.githubusercontent.com/mixmark-io/turndown/master/LICENSE - 2026-11-16: Categories, Runtime, Install with, License, License model
raw.githubusercontent.com/mixmark-io/turndown/master/README.md - 2026-11-16: Current major version, Last release
api.github.com/repos/mixmark-io/turndown/releases - 2026-11-16: Contributors
api.github.com/repos/mixmark-io/turndown/contributors - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/turndown - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/turndown