Quick start guide
Leave feedback
On this page
This guide shows you how to convert documents to Markdown with GroupDocs.Markdown for .NET. You’ll have working code in under 2 minutes.
flowchart LR
A["Input Document\n(DOCX, PDF, XLSX, EPUB, ...)"]
B["MarkdownConverter"]
C["Markdown Output\n(.md file or string)"]
A --> B --> C
- Install the NuGet package:
dotnet add package GroupDocs.Markdown
- Add the namespace:
using GroupDocs.Markdown;
The simplest conversion — one line of code:
using GroupDocs.Markdown;
// Convert a Word document to Markdown
string markdown = MarkdownConverter.ToMarkdown("business-plan.docx");
// Or save directly to a file
MarkdownConverter.ToFile("business-plan.docx", "qs-word-to-md.md");
business-plan.docx is a sample file used in this example. Click here to download it.

{
ImagesRelativePath = "images"
}
};
MarkdownConverter.ToFile("business-plan.pdf", "output/report.md", options);
// Images saved to output/images/
// Markdown references: 
business-plan.pdf is a sample file used in this example. Click here to download it.
output/images/img-001.png (3 KB)
output/images/img-002.jpg (73 KB)
output/images/img-003.jpg (76 KB)
output/report.md (7 KB)
Convert a spreadsheet with column truncation and front matter:
using GroupDocs.Markdown;
var options = new ConvertOptions
{
MaxColumns = 8,
MaxRows = 50,
IncludeFrontMatter = true,
Flavor = MarkdownFlavor.GitHub
};
using var converter = new MarkdownConverter("cost-analysis.xlsx");
// Inspect before converting
DocumentInfo info = converter.GetDocumentInfo();
Console.WriteLine($"Worksheets: {info.PageCount}");
// Convert
ConvertResult result = converter.Convert("qs-excel-options.md", options);
// Check warnings
foreach (string w in result.Warnings)
Console.WriteLine($"Warning: {w}");
cost-analysis.xlsx is a sample file used in this example. Click here to download it.
---
format: Xlsx
pages: 4
---
## Summary
| Category | FY2024 | FY2025 | FY2026 |
| --- | --- | --- | --- |
[TRUNCATED]
- Supported document formats — full list of input formats
- Image handling strategies — Base64, file system, skip, custom
- Markdown flavor control — GitHub vs CommonMark
- YAML front matter — for static site generators
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.