Author · nuget.org

<img align="right" width="160px" height="160px" src="img/markdig.png">

Markdig is a fast, powerful, CommonMark compliant, extensible Markdown processor for .NET.

Documentation: https://xoofx.github.io/markdig

You can try Markdig online and compare it to other implementations on babelmark3

Features

If you are looking for support for an old .NET Framework 3.5 or 4.0, you can download Markdig 0.18.3.

Third Party Extensions

Documentation

Full documentation is available at https://xoofx.github.io/markdig — covering getting started, usage, all extensions, and the developer guide for writing custom parsers and renderers.

For detailed specs and corner cases of each extension, see the specs documentation.

For a "behind the scene" article about Markdig, see the blog post "Implementing a Markdown Engine for .NET".

Download

Markdig is available as a NuGet package: NuGet

Also Markdig.Signed NuGet package provides signed assemblies.

Usage

The main entry point for the API is the Markdig.Markdown class:

By default, without any options, Markdig is using the plain CommonMark parser:

var result = Markdown.ToHtml("This is a text with some *emphasis*");
Console.WriteLine(result);   // prints: <p>This is a text with some <em>emphasis</em></p>

In order to activate most of all advanced extensions (except Emoji, SoftLine as HardLine, Bootstrap, YAML Front Matter, JiraLinks and SmartyPants)

// Configure the pipeline with all advanced extensions active
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
var result = Markdown.ToHtml("This is a text with some *emphasis*", pipeline);

Try it online!

You can have a look at the MarkdownExtensions that describes all actionable extensions (by modifying the MarkdownPipeline)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see contributing.md.

Build

In order to build Markdig, you need to install .NET 10.0

License

This software is released under the BSD-Clause 2 license.

Supports this project with a monthly donation and help me continue improving it. [Become a sponsor]

<img src="https://github.com/lilith.png?size=200" width="64px;" style="border-radius: 50%" alt="lilith"/> Lilith River, author of Imageflow Server, an easy on-demand image editing, optimization, and delivery server

Credits

Thanks to the fantastic work done by John Mac Farlane for the CommonMark specs and all the people involved in making Markdown a better standard!

This project would not have been possible without this huge foundation.

Thanks also to the project BenchmarkDotNet that makes benchmarking so easy to setup!

Some decoding part (e.g HTML EntityHelper.cs) have been re-used from CommonMark.NET

Thanks to the work done by @clarkd on the JIRA Link extension, now included with this project!

Alexandre MUTEL aka xoofx

Product 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 was computed.  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 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  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. 
  • .NETFramework 4.6.2

  • .NETStandard 2.0

  • .NETStandard 2.1

    • No dependencies.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (678)

Showing the top 5 NuGet packages that depend on Markdig:

Package Downloads
Umbraco.Cms.Web.Common

Contains the web assembly needed to run Umbraco CMS.

21.2M
Umbraco.Cms.Infrastructure

Contains the infrastructure assembly needed to run Umbraco CMS.

20.6M
Umbraco.Cms.Examine.Lucene

Adds Examine searching support using Lucene to Umbraco CMS.

20.1M
Umbraco.Cms.Web.Website

Contains the website assembly needed to run the frontend of Umbraco CMS.

17.5M
Umbraco.Cms

Installs Umbraco CMS with all default dependencies in your ASP.NET Core project.

7.4M

GitHub repositories (211)

Showing the top 20 popular GitHub repositories that depend on Markdig:

Repository Stars
DevToys-app/DevToys

A Swiss Army knife for developers.

31.9K
microsoft/semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps

28.5K
dotnet/maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

23.3K
bitwarden/server

Bitwarden infrastructure/backend (API, database, Docker, etc).

19.9K
Tyrrrz/YoutubeDownloader

Downloads videos and playlists from YouTube

16.0K
JosefNemec/Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.

13.8K
dotnet/AspNetCore.Docs

Documentation for ASP.NET Core

13.1K
Tyrrrz/DiscordChatExporter

Saves Discord chat logs to a file

11.8K
Kareadita/Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

11.6K
tui-cs/Terminal.Gui

Cross Platform Terminal UI toolkit for .NET

11.2K
MudBlazor/MudBlazor

Blazor Component Library based on Material Design principles. Do more with Blazor, utilizing CSS and keeping JavaScript to a bare minimum.

10.6K
dodyg/practical-aspnetcore

Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.

10.4K
nopSolutions/nopCommerce

ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.

10.1K
LykosAI/StabilityMatrix

Multi-Platform Package Manager for Stable Diffusion

8.7K
OrchardCMS/OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.

8.2K
BartoszCichecki/LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.

7.6K
ScottPlot/ScottPlot

Interactive plotting library for .NET

6.7K
microsoft/aspire

Aspire is the tool for code-first, extensible, observable dev and deploy.

6.3K
ant-design-blazor/ant-design-blazor

🌈A rich set of enterprise-class UI components based on Ant Design and Blazor.

6.2K
ServiceStack/ServiceStack

Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all

5.5K

Include prerelease

Include vulnerable

Include deprecated

Version Downloads Last Updated
1.3.2 1,530,206 6/18/2026
1.3.1 114,650 6/17/2026
1.3.0 88,315 6/13/2026
1.2.0 911,318 5/12/2026
1.1.3 791,623 4/20/2026
1.1.2 871,794 3/27/2026
1.1.1 797,569 3/4/2026
1.1.0 125,852 3/1/2026
1.0.1 20,992 2/28/2026
1.0.0 220,174 2/22/2026
1.0.0-preview.1 180 2/21/2026
0.45.0 1,069,752 2/10/2026
0.44.0 2,312,401 11/25/2025
0.43.0 969,033 10/21/2025
0.42.0 1,090,511 9/11/2025
0.41.3 2,948,897 6/24/2025
0.41.2 501,445 6/5/2025
0.41.1 1,992,417 4/28/2025
0.41.0 336,115 4/15/2025
0.40.0 4,100,604 1/10/2025

Loading failed

Read the original on nuget.org ↗