Product Family

MD File Viewer for .NET

View MD in a browser without requiring Microsoft Word or Office Automation.

How to View MD File Using C#

In order to view MD file, we’ll use

Aspose.Words for .NET

API which is a feature-rich, powerful and easy to use API for C# platform to be used with any Viewer. Open


package manager, search for Aspose.Words and install. You may also use the following command from the Package Manager Console.

Package Manager Console Command

PM> Install-Package Aspose.Words

Steps to View MD via C#

Developers can easily view MD file with just few lines of code.

  1. Load MD file with an instance of Document class
  2. Call the Document.Save method
  3. Save MD file in HTML Fixed format with embedded resources
  4. Call Process.Start with path to resultant HTML to load in default browser

System Requirements

Before integrating code, make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Aspose.Words for .NET referenced in your project

View MD file using C# example code

string output = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".html";
// load MD via an instance of Document
var document = new Document("");
// save in HTML Fixed format while embedding all resources
document.Save(output, new Saving.HtmlFixedSaveOptions()
    ExportEmbeddedCss = true,
    ExportEmbeddedFonts = true,
    ExportEmbeddedImages = true
// load resultant HTML in defualt browser
  • .NET Words API can be used to load, view and convert Microsoft Word and OpenDocument Formats like DOC, DOCX, ODT to PDF, XPS, HTML and various other formats. You can also create new documents from scratch and save them in the supported formats. It is a standalone API that is suitable for server side and backend systems where high performance is required. It does not depend on any software like Microsoft or OpenOffice. ‎

    Free App to View MD

    Other Supported Viewer Formats

    Using C#, One can also view many other file formats including.

    DOC (Microsoft Word Binary Format)
    DOCM (Microsoft Word 2007 Marco File)
    DOCX (Office 2007+ Words Document)
    DOT (Microsoft Word Template Files)
    DOTM (Microsoft Word 2007+ Template File)
    DOTX (Microsoft Word Template File)
    HTML (Hyper Text Markup Language)
    MHTML (Web Page Archive Format)
    MOBI (Open Ebook Format)
    ODT (OpenDocument Text File Format)
    OTT (OpenDocument Standard Format)
    PDF (Portable Document Format)
    RTF (Rich Text Format)
    TXT (Text Document)