Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Introduction
Turndown is an HTML-to-Markdown library written in JavaScript by Dom Christie. It is open source under the MIT license, and the source code is on GitHub (mixmark-io/turndown). The official website is an online demo: you enter HTML on the left, the converted Markdown appears in real time on the right, and you can switch between various output style options directly.
Key Features
- HTML to Markdown: Converts HTML strings into Markdown text.
- CommonMark compliant: Aims to be compatible with the CommonMark specification, so the output is broadly portable.
- Configurable output style:
headingStyle: heading style, either setext or atxhorizontalRule: horizontal rule character, one of*,-or_bullet: unordered list marker, one of*,-or+codeBlockStyle: code block style, either indented or fencedfence: fence characters, either ``` or ~~~emDelimiter: italic delimiter, either_or*strongDelimiter: bold delimiter, either**or__linkStyle: link style, either inlined or referencedlinkReferenceStyle: reference link style, one of full, collapsed or shortcut
- Online demo: Try the conversion directly on the official website and compare the output of different options in real time.
Basic Usage
var turndownService = new TurndownService()
console.log(
turndownService.turndown('<h1>Hello world</h1>')
)
In JavaScript projects, you typically install it with npm (npm install turndown), then create a TurndownService instance and call the turndown() method to perform the conversion.
Target Users and Use Cases
It suits developers who need to convert web pages or rich text content into Markdown, for example:
- Web clipping and article-saving tools
- Converting rich text pasted into editors to Markdown
- Content migration and blog imports
- Browser extensions
- Preprocessing web content for AI or text-processing pipelines
Core Advantages
- Pure JavaScript implementation, easy to integrate into front-end or Node.js projects
- Output format can be fine-tuned to fit different Markdown writing habits
- Targets CommonMark, so the output is fairly standard
- MIT license, free to use in both commercial and personal projects
Discover more
Writing
Lightweight distraction-free text editor, in the browser (Markdown and LaTeX supported). No lag when writing.
AFFiNE
There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
DailyTxT
Encrypted diary Web application to save your personal memories of each day. Includes a search function and encrypted file upload.
Docs
Collaborative note taking, wiki and documentation platform that scales.
Many Notes
Markdown note-taking web application designed for simplicity
NoteDiscovery
Your Self-Hosted Knowledge Base