ReverseMarkdown 6.2.1
dotnet add package ReverseMarkdown --version 6.2.1
NuGet\Install-Package ReverseMarkdown -Version 6.2.1
<PackageReference Include="ReverseMarkdown" Version="6.2.1" />
<PackageVersion Include="ReverseMarkdown" Version="6.2.1" />
<PackageReference Include="ReverseMarkdown" />
paket add ReverseMarkdown --version 6.2.1
#r "nuget: ReverseMarkdown, 6.2.1"
#:package ReverseMarkdown@6.2.1
#addin nuget:?package=ReverseMarkdown&version=6.2.1
#tool nuget:?package=ReverseMarkdown&version=6.2.1
Meet ReverseMarkdown

ReverseMarkdown is a HTML to Markdown converter library in C#. v6 uses AngleSharp's HTML5-compliant parser and a Markdown DOM pipeline for reliable, performant conversion.
📖 Full documentation: mysticmind.github.io/reversemarkdown-net
Using v5.x? See the v5.x documentation.
If you have used and benefitted from this library, please feel free to sponsor me!
Install
dotnet add package ReverseMarkdown
Quick start
var converter = new ReverseMarkdown.Converter();
string html = "This a sample <strong>paragraph</strong> from <a href=\"http://test.com\">my site</a>";
string result = converter.Convert(html);
// This a sample **paragraph** from [my site](http://test.com)
With configuration and a flavor:
var config = new ReverseMarkdown.Config
{
Flavor = Config.MarkdownFlavor.GitHub,
Formatting = { RemoveComments = true },
Links = { SmartHref = true },
};
var converter = new ReverseMarkdown.Converter(config);
Real-world HTML often needs cleaning up first. Config.Preprocess is a chainable pipeline applied
to the source markup before it converts:
var config = new ReverseMarkdown.Config();
config.Preprocess
.RemoveScripts() // <script>/<noscript> and on* handlers
.RemoveStyles() // style attributes, <style>, stylesheet <link>
.Remove("nav, footer, .advertisement") // drop page chrome
.Unwrap("span, font") // keep the text, lose the wrapper
.Rename("b", "strong");
var markdown = new ReverseMarkdown.Converter(config).Convert(html);
Features
- Seven output flavors - Default, GitHub, CommonMark, Slack, Telegram, MultiMarkdown, and Pandoc, selected via the
Flavorenum. - Spec-compliant round-trips - CommonMark and GitHub Flavored Markdown round-trip at 100% against canonical cmark-gfm; MultiMarkdown and Pandoc verified against canonical pandoc.
- HTML preprocessing - clean up the source before it converts with a chainable pipeline of 23 helpers: remove or unwrap elements, rename or replace them, strip styles, scripts and attributes, recover formatting from inline CSS (Word/Outlook exports), and resolve relative URLs. Plug in your own steps too. See HTML Preprocessing.
- Extensible - custom readers (
IMdReader+[MarkdownReader]), tag aliases, and aParse/RenderMarkdown DOM for direct transformation. - Tables, links, and images - nested tables and captions, configurable handling for lists inside table cells, smart href handling, URI-scheme whitelisting, and base64 image handling (include / skip / save to disk).
- Broad framework support - targets
netstandard2.0,net8.0,net9.0, andnet10.0(runs on .NET Framework 4.6.1+, .NET Core 2.0+, Mono, and Unity). - Trimming and Native AOT ready - the default conversion path uses no reflection; add custom readers with
RegisterReaderunder trimming/AOT. See Supported Frameworks.
Performance
v6 replaces the v5 HtmlAgilityPack engine with an AngleSharp HTML5 parser feeding a Markdown DOM and per-flavor writers. It is roughly 2–2.6× faster than v5 and allocates about 2.7× less memory.

Measured with BenchmarkDotNet on .NET 9.0 (Apple M1), comparing published ReverseMarkdown 5.5.0
vs 6.0.0 on the same inputs (lower is better):
| Fixture | Mean time v5 → v6 | Allocated v5 → v6 |
|---|---|---|
| 1000 paragraphs | 13.7 → 5.2 ms (2.6× faster) | 21 → 7 MB (2.8× less) |
| 10k paragraphs | 119.1 → 63.1 ms (1.9× faster) | 183 → 67 MB (2.7× less) |
| huge.html | 540.6 → 244.3 ms (2.2× faster) | 779 → 288 MB (2.7× less) |
See the Performance guide for details and how to reproduce the benchmark.
Documentation
The full guide lives at mysticmind.github.io/reversemarkdown-net:
- Getting Started
- Performance
- Flavors
- Configuration reference
- HTML Preprocessing
- Extending (custom readers, recipes)
- Migrating from v5
Acknowledgements
This library's initial implementation ideas from the Ruby based Html to Markdown converter xijo/reverse_markdown.
Copyright
Copyright © Babu Annamalai
License
ReverseMarkdown is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- AngleSharp (>= 1.5.2)
-
net10.0
- AngleSharp (>= 1.5.2)
-
net8.0
- AngleSharp (>= 1.5.2)
-
net9.0
- AngleSharp (>= 1.5.2)
NuGet packages (46)
Showing the top 5 NuGet packages that depend on ReverseMarkdown:
| Package | Downloads |
|---|---|
|
ImmediaC.SimpleCms
ASP.NET Core based CMS |
|
|
Kentico.Xperience.Core
The runtime assemblies for applications and libraries that use the Xperience by Kentico API. |
|
|
Blogifier.Core
Blogifier Core Library provides Database and file I/O support to Blogifier projects via common service layer |
|
|
DocWorks.Common.Transformation
This is common code in DocWorks CMS Application |
|
|
ElBruno.MarkItDotNet
.NET library that converts file formats to Markdown for AI pipelines, documentation workflows, and developer tools. Inspired by Python markitdown. |
GitHub repositories (14)
Showing the top 14 popular GitHub repositories that depend on ReverseMarkdown:
| Repository | Stars |
|---|---|
|
Sylinko/Everywhere
On-screen aware AI assistant for your desktop. Uses current app context, multiple LLMs, and MCP tools to help you act across apps.
|
|
|
win4r/AISuperDomain
Aila(AI超元域): The premier AI integration tool for Windows, macOS, and Android. Ask once, get answers from 10+ AIs like ChatGPT, Gemini, Claude3, Copilot, Poe, perplexity and more. Features customizable AI and prompts.
|
|
|
DuendeSoftware/products
The most flexible and standards-compliant OpenID Connect and OAuth 2.x framework for ASP.NET Core
|
|
|
blogifierdotnet/Blogifier
Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. With Blogifier make a personal blog or a website.
|
|
|
Reloaded-Project/Reloaded-II
Universal .NET Core Powered Modding Framework for any Native Game X86, X64.
|
|
|
MindWorkAI/AI-Studio
MindWork AI Studio is a free, independent cross-platform desktop app for local and cloud LLMs across providers, built to democratize AI access.
|
|
|
darklinkpower/PlayniteExtensionsCollection
Collection of extensions made for Playnite.
|
|
|
CervantesSec/cervantes
Cervantes is an open-source, collaborative platform designed specifically for pentesters and red teams. It serves as a comprehensive management tool, streamlining the organization of projects, clients, vulnerabilities, and reports in a single, centralized location.
|
|
|
linkdotnet/Blog
A blog (engine) completely written in C# and Blazor. It aims to be a simple use and easy to extend platform. Blogposts are written in Markdown and are rendered to HTML. This gives all the flexibility needed to express yourself but also have an easy way of creating posts in the first place.
|
|
|
whistyun/Markdown.Avalonia
render markdown with Avalonia UI
|
|
|
shuyu-labs/Windows-MCP.Net
A .NET-based Windows desktop automation MCP (Model Context Protocol) server that provides AI assistants with the ability to interact with the Windows desktop environment.
|
|
|
daniel3303/Equibles
Self-hosted, open-source financial data MCP server for AI agents — SEC filings, XBRL financials, 13F holdings, insider & congressional trades, short interest, FRED, CFTC/CBOE and daily prices across 64 MCP tools. Equibles Cloud adds earnings call transcripts, live quotes, options chains with Greeks, guidance and a screener.
|
|
|
CnGal/CnGalWebSite
CnGal是一个非营利性的,立志于收集整理国内制作组创作的中文Galgame/AVG的介绍、攻略、评测、感想等内容的资料性质的网站。
|
|
|
aehyok/.NET8.0
net8.0 efcore mysql redis rabbitmq 微服务
|
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.1 | 0 | 8/13/2026 |
| 6.2.0 | 0 | 8/13/2026 |
| 6.1.1 | 26,787 | 7/28/2026 |
| 6.1.0 | 42,689 | 7/7/2026 |
| 6.0.0 | 6,691 | 7/6/2026 |
| 5.5.0 | 27,892 | 7/6/2026 |
| 5.4.0 | 89,623 | 6/13/2026 |
| 5.3.0 | 395,127 | 3/31/2026 |
| 5.2.1 | 920 | 3/31/2026 |
| 5.2.0 | 191,868 | 2/24/2026 |
| 5.1.0 | 2,624 | 2/24/2026 |
| 5.0.0 | 235,519 | 1/8/2026 |
| 4.7.1 | 397,057 | 10/27/2025 |
| 4.7.0 | 753,439 | 5/22/2025 |
| 4.6.0 | 1,001,778 | 6/29/2024 |
| 4.4.0 | 101,645 | 5/4/2024 |
| 4.3.0 | 210,396 | 1/23/2024 |