* Write custom containers between ::: fences of their original length, with their info and arguments, and close an unclosed container * Write footnote references as [^label] and footnotes as [^label]: content with continuation lines indented by four spaces, leaving out the back links and the paragraph the parser adds for them * Skip link reference definitions that create their own inline, such as those of footnotes and auto-identifier headings, which wrote [^1]: and []: lines once a footnote put the definition group into the document * End the definition group with a blank line, so that a following footnote or line is not read back as part of a definition Co-authored-by: CodeAlta <noreply@codealta.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
title, layout, og_type
| title | layout | og_type |
|---|---|---|
| Home | simple | website |
Markdig
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET.
dotnet add package Markdig
Available on NuGet — .NET Standard 2.0+
Try Markdig live with the public API. Edit Markdown, pick extensions, and click Run (or press Ctrl+Enter).
MarkdownPipelineBuilder.Configure(...) on the remote playground service.
<h1>Markdig Playground</h1>
<p>Markdig is a <strong>fast</strong> and extensible Markdown processor for .NET.</p>
Markdig Playground
Markdig is a fast and extensible Markdown processor for .NET.
Regex-free parser and HTML renderer with minimal GC pressure. 20% faster than the reference C implementation (cmark) and 100× faster than regex-based processors.
Passes 600+ tests from the latest CommonMark specification (0.31.2). Full support for all core Markdown constructs including GFM fenced code blocks.
Tables, task lists, math, diagrams, footnotes, emoji, alert blocks, abbreviations, and more — all included out of the box. Enable them individually or all at once.
Pluggable architecture — even core parsing is customizable. Create your own block parsers, inline parsers, and renderers with a clean API.
Full abstract syntax tree with precise source locations. Power syntax highlighters, editors, and document analysis tools with the complete Descendants API.
Parse with trivia tracking for lossless parse → render roundtrips. Modify Markdown documents programmatically without introducing unwanted changes.
using Markdig;
// Simple CommonMark conversion
var result = Markdown.ToHtml("This is a text with some *emphasis*");
// => "<p>This is a text with some <em>emphasis</em></p>\n"
// Enable all advanced extensions
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
var result = Markdown.ToHtml("This is a ~~strikethrough~~", pipeline);
// => "<p>This is a <del>strikethrough</del></p>\n"
For more examples, see the Getting started guide.