Features overview
Leave feedback
On this page
GroupDocs.Markdown for .NET converts documents from various formats into clean, structured Markdown. It uses a custom DOM-based renderer that gives full control over every aspect of the output.
Convert from 20+ document formats including Word (DOCX, DOC, RTF), Excel (XLSX, XLS, CSV), PDF, EPUB, MOBI, TXT, and CHM. See the full list of supported formats.
One-liner conversions that throw on failure — no result-checking ceremony:
string md = MarkdownConverter.ToMarkdown("business-plan.docx");
MarkdownConverter.ToFile("business-plan.docx", "output.md");
Target GitHub Flavored Markdown (pipe tables, strikethrough) or strict CommonMark:
var options = new ConvertOptions { Flavor = MarkdownFlavor.GitHub };
Choose how images are processed during conversion:
- Base64 embedding — images inline in the Markdown (default)
- File system export — save images to disk with relative paths
- Skip — omit images from the output
- Custom — rename, replace, or redirect images via callback
Extract document metadata into YAML front matter for static site generators (Jekyll, Hugo, Docusaurus):
var options = new ConvertOptions { IncludeFrontMatter = true };
Shift all heading levels when embedding converted content inside a larger document:
var options = new ConvertOptions { HeadingLevelOffset = 2 };
// # Title → ### Title
Control how Excel and CSV tables are rendered:
- Column and row truncation with ellipsis indicators
- Custom sheet separators
- Hidden worksheet filtering
Retrieve document metadata (format, page count, title, author) without performing a full conversion:
DocumentInfo info = MarkdownConverter.GetInfo("business-plan.docx");
Convert specific pages or worksheets instead of the full document:
var options = new ConvertOptions { PageNumbers = new[] { 1, 3, 5 } };
Control how image file paths appear in the Markdown output:
var strategy = new ExportImagesToFileSystemStrategy("output/images")
{
ImagesRelativePath = "images"
};
Replace images in the source document with different images during conversion using IImageSavingHandler.
All static and instance methods have async counterparts with true async file I/O:
string md = await MarkdownConverter.ToMarkdownAsync("business-plan.docx");
Specific exception types for common error scenarios:
DocumentProtectedException— wrong or missing passwordInvalidFormatException— corrupt or unrecognized fileGroupDocsMarkdownException— general conversion error
Non-fatal issues are reported via ConvertResult.Warnings — for example, when spreadsheet tables are truncated.
Load encrypted documents by providing a password via LoadOptions:
var loadOptions = new LoadOptions(FileFormat.Docx) { Password = "secret" };
Works on Windows, Linux, and macOS with .NET Framework 4.6.2+, .NET 6.0+, .NET 8.0+, and .NET 10.0+.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.