ReverseMarkdown 6.4.0
dotnet add package ReverseMarkdown --version 6.4.0
NuGet\Install-Package ReverseMarkdown -Version 6.4.0
<PackageReference Include="ReverseMarkdown" Version="6.4.0" />
<PackageVersion Include="ReverseMarkdown" Version="6.4.0" />
<PackageReference Include="ReverseMarkdown" />
paket add ReverseMarkdown --version 6.4.0
#r "nuget: ReverseMarkdown, 6.4.0"
#:package ReverseMarkdown@6.4.0
#addin nuget:?package=ReverseMarkdown&version=6.4.0
#tool nuget:?package=ReverseMarkdown&version=6.4.0
ReverseMarkdown
Fast, spec-compliant HTML to Markdown converter for .NET, built on AngleSharp's HTML5 parser, with seven output flavors and a preprocessing pipeline for real-world HTML. Its companion package, ReverseMarkdown.Readability, extracts just the article from a web page, like Firefox Reader View.
📖 Documentation · Using v5? See the v5 docs.
Find it useful? Sponsor ReverseMarkdown ❤
Packages
| Package | What it does |
|---|---|
| ReverseMarkdown | Converts HTML to Markdown in seven flavors. |
| ReverseMarkdown.Readability (0.x) | Extracts the main content of a web page as Markdown, with title, author and date. |
Install
dotnet add package ReverseMarkdown
dotnet add package ReverseMarkdown.Readability # optional: main-content extraction
Quick start
Convert HTML to Markdown:
var converter = new ReverseMarkdown.Converter();
string markdown = converter.Convert("<p>This is <strong>bold</strong> and <a href=\"https://example.com\">a link</a>.</p>");
// This is **bold** and [a link](https://example.com).
Extract just the article from a whole web page:
using ReverseMarkdown.Readability;
var article = converter.ExtractMainContent(pageHtml);
Console.WriteLine(article.Title); // Five Caching Strategies
Console.WriteLine(article.Author); // Priya Raman
Console.WriteLine(article.Markdown); // the article, without navigation, sidebars, ads or footers
Sponsors
Built and maintained in my spare time. Sponsoring keeps it fast and up to date; Silver sponsors and above get their logo here and on NuGet.
Founding sponsor
ReverseMarkdown is sponsored by Byteful.
Sponsored. Claims in the banner are Byteful's own.
Your logo here? Become a sponsor.
ReverseMarkdown
Flavors
Choose the output with new Config { Flavor = Config.MarkdownFlavor.GitHub }. See Flavors.
| Flavor | Produces |
|---|---|
Default |
Clean, general-purpose Markdown |
GitHub |
GitHub Flavored Markdown: pipe tables, task lists, ~~ strikethrough, autolinks, $ math |
CommonMark |
CommonMark, round-trip faithful (100% against cmark-gfm) |
Slack |
Slack mrkdwn: *bold*, _italic_, ~strike~, • bullets |
Telegram |
Telegram MarkdownV2 with its escaping rules |
MultiMarkdown |
MultiMarkdown: metadata, footnotes, definition lists, math |
Pandoc |
Pandoc Markdown: front matter, footnotes, definition lists, math, fenced divs |
What it converts
- Text and structure: headings, paragraphs, emphasis, block quotes, nested and task lists, horizontal rules, line breaks, with Markdown-significant characters escaped correctly.
- Tables: pipe tables with alignment, captions and header detection; nested tables and lists in cells are handled by configurable rules.
- Links and images: smart
hrefhandling, URI-scheme allow-lists, and base64 images included, skipped or saved to disk. - Code: inline code and fenced blocks with the language kept from
language-xclasses. - Footnotes, math, abbreviations and definition lists in the flavors that support them.
- Unknown tags: passed through, dropped, unwrapped or reported, your choice.
All options are in the configuration reference.
Preprocessing real-world HTML
Config.Preprocess is a chainable pipeline that shapes the HTML before it converts: remove or
unwrap elements, rename or replace them, strip styles, scripts and attributes, recover formatting
from inline CSS (Word and Outlook exports), and resolve relative URLs. Standardizing steps rewrite
generator markup into clean Markdown: StandardizeMath() (KaTeX, MathJax, MathML),
StandardizeCodeBlocks() (syntax highlighters, without line numbers), StandardizeFootnotes()
(Substack, arXiv and other plugins), RestructureBlockLinks() and RemoveHeadingPermalinks().
See HTML Preprocessing.
Extending and output
- Markdown DOM:
Parsegives a mutable Markdown DOM to reshape beforeRender. - Custom readers and tag aliases for elements you want converted your way. See Extending.
- Streaming: write straight to a
TextWriteror file, sync or async, without building the whole string. See Getting Started.
Performance and platforms
Roughly 2 to 2.6× faster than v5 with about 2.7× less memory (benchmarks).
Targets netstandard2.0, net8.0, net9.0 and net10.0, so it runs on .NET Framework 4.6.1+,
.NET Core, Mono and Unity, and is trimming and Native AOT ready.
ReverseMarkdown.Readability
Early version (0.x). The API may change before 1.0, and extraction results improve between versions.
converter.ExtractMainContent(html) returns the main content of a web page and its metadata, in
the spirit of Firefox Reader View (Readability) and Defuddle, written from scratch on AngleSharp and
ReverseMarkdown. It runs in .NET with no browser or JavaScript runtime.
- Clean content: the article without navigation, sidebars, ads, share bars, cookie banners, author boxes or "related posts". Math, footnotes and code blocks from common generators come out clean, and links always come out as Markdown, whatever the flavor.
- Metadata:
Title,Author,Description,SiteName,Published,Language,Image,Favicon,DomainandWordCount, read from OpenGraph, JSON-LD and meta tags, or from the byline and date next to the headline. Pandoc and MultiMarkdown output includes them as front matter. - Steering:
ContentSelectornames the content outright,RemoveSelectorsandKeepSelectorsadjust what is removed, and each removal pass can be switched off. - Diagnostics: see which element was chosen and every element removed, with the reason.
- Quality: tested against all 250 pages of Defuddle's test corpus, at a mean content F1 of 96%.
See Extract main content.
Documentation
The full guide lives at mysticmind.github.io/reversemarkdown-net:
- Getting Started
- Performance
- Flavors
- Configuration reference
- HTML Preprocessing
- Extending (custom readers, recipes)
- Extract main content (ReverseMarkdown.Readability)
- Migrating from v5
Acknowledgements
Inspired by the Ruby converter xijo/reverse_markdown.
License
MIT License. Copyright © Babu Annamalai.
| 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 (64)
Showing the top 5 NuGet packages that depend on ReverseMarkdown:
| Package | Downloads |
|---|---|
|
Kentico.Xperience.Core
The runtime assemblies for applications and libraries that use the Xperience by Kentico API. |
|
|
ImmediaC.SimpleCms
ASP.NET Core based CMS |
|
|
AgentCircuits.Providers.Anthropic
Anthropic Claude provider for AgentCircuits agent framework. Supports Claude 3.5 Sonnet, Opus, and Haiku with streaming, tool calling, and prompt caching. |
|
|
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 |
GitHub repositories (15)
Showing the top 15 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
|
|
|
telerik/blazor-ui
A collection of examples related to Telerik UI for Blazor Components: https://www.telerik.com/blazor-ui
|
|
|
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.
|
|
|
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.
|
|
|
CnGal/CnGalWebSite
CnGal是一个非营利性的,立志于收集整理国内制作组创作的中文Galgame/AVG的介绍、攻略、评测、感想等内容的资料性质的网站。
|
|
|
aehyok/.NET8.0
net8.0 efcore mysql redis rabbitmq 微服务
|
| Version | Downloads | Last Updated |
|---|---|---|
| 6.4.0 | 0 | 12/6/2026 |
| 6.3.1 | 26,688 | 11/27/2026 |
| 6.3.0 | 240,578 | 10/21/2026 |
| 6.2.1 | 518,936 | 8/13/2026 |
| 6.2.0 | 2,762 | 8/13/2026 |
| 6.1.1 | 107,150 | 7/28/2026 |
| 6.1.0 | 165,035 | 7/7/2026 |
| 6.0.0 | 7,709 | 7/6/2026 |
| 5.5.0 | 103,494 | 7/6/2026 |
| 5.4.0 | 183,359 | 6/13/2026 |
| 5.3.0 | 591,191 | 3/31/2026 |
| 5.2.1 | 1,096 | 3/31/2026 |
| 5.2.0 | 289,127 | 2/24/2026 |
| 5.1.0 | 3,498 | 2/24/2026 |
| 5.0.0 | 314,250 | 1/8/2026 |
| 4.7.1 | 667,243 | 10/27/2025 |
| 4.7.0 | 965,463 | 5/22/2025 |
| 4.6.0 | 1,262,185 | 6/29/2024 |
