Skip to content

Introduction

ReverseMarkdown is an HTML to Markdown converter library for C#/.NET.

Version 6 is a ground-up rewrite: HTML is parsed with AngleSharp's HTML5-compliant parser into an intermediate Markdown DOM, which is then rendered through per-flavor writers. The result is more correct, faster, and extensible, and it adds MultiMarkdown and Pandoc output flavors.

Highlights

  • Seven output flavors - Default, GitHub, CommonMark, Slack, Telegram, MultiMarkdown, and Pandoc, chosen via the Flavor enum.
  • Spec-compliant round-trips - CommonMark (651/651) and GitHub Flavored Markdown (672/672) round-trip at 100% against canonical cmark-gfm; MultiMarkdown and Pandoc are verified against canonical pandoc.
  • Filterable, structured output - Parse() returns a mutable Markdown DOM you can traverse and transform before Render(), plus HTML pre-filtering via CSS selectors and predicates.
  • Extensible - plug in custom readers, alias tags, or transform the DOM directly.
  • Fast and lean - roughly 2–2.6× faster than v5 with ~2.7× less allocation; see Performance.
  • Trimming and Native AOT ready - the default path uses no reflection; see Supported Frameworks.
  • Broad framework support - see Supported Frameworks.

Using v5.x? See the v5.x documentation.

Released under the MIT License.