Skip to content

Turndown vs Vditor

Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.

Turndown

Open source · MIT

A JavaScript library that converts HTML into Markdown, in Node.js or the browser.

Vditor

Open source · MIT

A browser-based Markdown editor with rich-text, live-render and split-view modes.

The short answer

Choose Turndown if you need…

  • Developers who need to convert HTML content, such as web pages or rich text editor output, into Markdown
  • Node.js or browser projects that want a JavaScript-only conversion step
  • Projects that need custom conversion rules for particular HTML tags
  • Teams that want GitHub-flavored Markdown tables or strikethrough via the turndown-plugin-gfm plugin

Choose Vditor if you need…

  • Developers who want to embed a Markdown editor in a web app
  • Teams building a blog, forum or content tool that needs in-browser editing
  • Users who want a choice between rich-text and raw Markdown editing
  • Projects using Vue, React, Angular or Svelte, or plain JavaScript

Side-by-side

TurndownVditor
TypeLibraryLibrary
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars11.5k11.4k
Setup difficultyBeginnerIntermediate
How you get itInstall with a package managerInstall with a package manager
Main languageHTMLTypeScript
Last code update19 days ago19 days ago

What each one is

Turndown

Turndown is a JavaScript library that takes HTML and outputs Markdown text. You can call it from Node.js code or run it in a web page. It lets you customize how specific HTML elements are converted by adding rules, keeping or removing elements, or using plugins.

Vditor

Vditor is an editor for Markdown text that runs inside a web page. It offers three editing styles: WYSIWYG (rich text, so you see formatted output while editing), instant rendering similar to Typora, and a split view with source on one side and preview on the other. Developers add it to their own websites or apps to let users write Markdown.

Best for

Turndown

  • Developers who need to convert HTML content, such as web pages or rich text editor output, into Markdown
  • Node.js or browser projects that want a JavaScript-only conversion step
  • Projects that need custom conversion rules for particular HTML tags
  • Teams that want GitHub-flavored Markdown tables or strikethrough via the turndown-plugin-gfm plugin

Vditor

  • Developers who want to embed a Markdown editor in a web app
  • Teams building a blog, forum or content tool that needs in-browser editing
  • Users who want a choice between rich-text and raw Markdown editing
  • Projects using Vue, React, Angular or Svelte, or plain JavaScript

Strengths

Turndown

  • Simple API: create a service and call turndown() on HTML input, as shown in the README
  • Configurable through documented options and extendable with custom rules and plugins
  • Works in both Node.js and the browser, with UMD builds available for RequireJS

Vditor

  • Supports three editing modes (WYSIWYG, instant render, split view) in one editor
  • Implements CommonMark and GFM specifications with many extras such as math, diagrams and footnotes
  • Open source under the MIT license with a long history and an active repository

Not ideal for

Turndown

  • Non-programmers who want a point-and-click converter, since the README only documents code usage
  • Anyone who needs to convert Markdown back into HTML, since the README covers only HTML-to-Markdown conversion
  • Projects needing exact round-trip fidelity, because the README notes its escaping rules can be quite aggressive

Vditor

  • People who just want a desktop note-taking app; Vditor is a component for developers, not a finished application
  • Projects that need a native mobile editor, since the README only says it is mobile-friendly in browsers
  • Anyone needing a built-in server or storage; the README covers the editor only

Trade-offs

Turndown

  • Escaping is handled with regular expressions and the README says the rules can be quite aggressive, which may alter text
  • The README documents only the JavaScript API, so non-developers will need programming skills to use it
  • Some features such as GFM tables depend on a separate plugin package

Vditor

  • Primarily aimed at developers integrating it, so setup requires coding
  • The latest release (v4.0.1) ships without binaries, so it is used as a library
  • Many features depend on configuration and optional renderers, which adds complexity

Getting started

Turndown

Install from npm

npm install turndown
Step-by-step guide: how to use Turndown

Vditor

Install the package via npm

npm install vditor --save
Step-by-step guide: how to use Vditor

Frequently asked questions

What is the difference between Turndown and Vditor?

Turndown: A JavaScript library that converts HTML into Markdown, in Node.js or the browser. Vditor: A browser-based Markdown editor with rich-text, live-render and split-view modes. Turndown suits developers who need to convert html content, such as web pages or rich text editor output, into markdown, while Vditor suits developers who want to embed a markdown editor in a web app.

Are Turndown and Vditor free?

Turndown: Free and open source. Vditor: Free and open source.

Which is easier to set up, Turndown or Vditor?

Turndown is easier to get started with (rated beginner); Vditor is rated intermediate and usually needs more setup.

Is Turndown or Vditor more popular?

Turndown has more GitHub stars (11.5k) than Vditor (11.4k). Popularity isn't the same as fit — check which one matches your use case above.

What are other alternatives to Turndown and Vditor?

Other options people compare them with include react-markdown, Showdown, markdown-it, Editor.md, Milkdown.

Keep comparing

Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.