GroupDocs.Markdown at a glance

Python API to export documents to clean, structured Markdown.

Illustration markdown

Accurate and reliable conversion

Efficiently convert supported formats to Markdown while maintaining structure integrity. Works on Windows, Linux, and macOS with Python 3.5+.

Popular formats supported

Export PDF, Word, Excel, eBooks, Web and plain text files to Markdown, including password-protected documents.

Runs on your local machine

You control your data — an on-premise API that does not require any cloud or internet connection.

Platforms support

The following operating systems and package managers are supported.

Amazon
Docker
Azure
Eclipse
IntelliJ
Windows
Linux
PyPI

Supported file formats

The following file formats are supported for export to Markdown.

PDF

  • Digital PDFs, PDF/A, PDF/E, PDF/X and PDF/UA
  • Encrypted and Signed PDFs

Word & Excel

  • Word: DOCX, DOC, RTF, DOCM, DOTX, DOTM, DOT, ODT, OTT
  • Excel: XLSX, XLS, CSV, XLSM, XLSB, ODS, TSV, NUMBERS, XLTX, XLTM, XLAM, FODS, SXC, OTS, XLT

Other

  • e-Books: EPUB, MOBI, AZW3
  • Text: TXT, XML
  • Web: CHM

GroupDocs.Markdown features

These are the features that make our product stand out.

Feature icon

Export multiple document formats

Convert most popular document formats to Markdown (PDF, DOCX, XLSX, EPUB and more).

Feature icon

Advanced Markdown formatting

Headings, paragraphs, lists, tables, links, images, blockquotes and code blocks are exported to the appropriate Markdown syntax.

Feature icon

Full control over images

Take control over images by exporting them or embedding into the output Markdown file.

Feature icon

Runs on your local machine

No cloud or Internet connection required. All processing is done on your local machine.

Feature icon

Intuitive public API

Simple and intuitive public API designed by developers for developers with love.

Feature icon

Works on Windows and Linux

.NET and .NET Framework assemblies are provided within the NuGet package.

Code samples

The most common usage scenarios for exporting documents to Markdown in Python.

Export DOCX to Markdown

Convert a Word document to Markdown. Images are embedded as Base64 by default.
# Import the module
from groupdocs.markdown import MarkdownConverter

# Convert and save output to file
MarkdownConverter.to_file("annual-review.docx", "annual-review.md")

Save images to a folder

Convert a document to Markdown and save images to a separate folder with relative paths.
# Import the module
from groupdocs.markdown import MarkdownConverter, ConvertOptions
from groupdocs.markdown import ExportImagesToFileSystemStrategy

# Configure image export to file system
strategy = ExportImagesToFileSystemStrategy("./images")
strategy.images_relative_path = "images"
options = ConvertOptions()
options.image_export_strategy = strategy

# Convert and save output to file
MarkdownConverter.to_file(
    "annual-report.docx", "annual-report.md",
    convert_options=options)

Inspect document and convert specific pages

Get document metadata before converting, then export only the pages you need.
# Import the module
from groupdocs.markdown import MarkdownConverter, ConvertOptions

# Inspect the document without converting
info = MarkdownConverter.get_info("report.pdf")
print(f"{info.page_count} pages, by {info.author}")

# Convert only the first 3 pages with front matter
options = ConvertOptions()
options.page_numbers = [1, 2, 3]
options.include_front_matter = True

# Use the one-liner static method
md = MarkdownConverter.to_markdown("report.pdf",
    convert_options=options)

Ready to get started?

Download GroupDocs.Markdown for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English