--- id: pypandoc version: "1.17" license: MIT license_treatment: permissive maintenance: active --- # pypandoc — Thin wrapper for pandoc. License: permissive · Maintenance: active · Downloads: 8.8M/mo ## What it is and what it does Pypandoc is a thin Python wrapper around pandoc, the widely-used universal document converter. It lets you call pandoc's conversion capabilities directly from Python code without shelling out or managing subprocess calls yourself. You can convert between dozens of document formats—Markdown, HTML, DOCX, PDF, reStructuredText, EPUB, and many others—by passing input as files, file patterns, or strings, and optionally writing output to a file. The package has no Python runtime dependencies and installs as a pure wheel, making it lightweight to add to any project. Pandoc itself must be available on your system (either pre-installed or via the companion pypandoc_binary package), but pypandoc handles locating it automatically or via an environment variable. It supports modern Python versions (3.7 through 3.15) and has been actively maintained since 2011. Use it for: - Convert Markdown documentation to HTML or DOCX for sharing with non-technical stakeholders - Batch-convert multiple document files from one format to another in an automated pipeline - Generate PDF reports from Markdown templates in a web application or data processing workflow - Transform reStructuredText to HTML as part of a documentation build system - Apply pandoc filters (like pandoc-citeproc) to add citations or other processing to converted documents ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pypandoc wraps pandoc, a universal document converter, letting you convert between document formats (Markdown, HTML, DOCX, PDF, and many others) from Python code. Yes. Pypandoc is a stable, actively maintained wrapper with no Python dependencies, permissive licensing, and broad platform support. Install it if you need to convert between document formats from Python code. The only gotcha is that pandoc itself must be available on your system—either pre-installed or via the pypandoc_binary companion package. ## Install pip install pypandoc uv add pypandoc poetry add pypandoc ## Installing pypandoc Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and a stable release history since 2011. Supports Python 3.7 through 3.15. License in practice: MIT license (permissive): you can use, modify, and distribute pypandoc freely in commercial and private projects with minimal restrictions. Quickstart: pip install pypandoc import pypandoc # Convert Markdown file to reStructuredText output = pypandoc.convert_file('somefile.md', 'rst') # Or convert a string output = pypandoc.convert_text('# Title', 'html', format='md') Pandoc must be installed separately on your system (or use pypandoc_binary package which includes it). Set PYPANDOC_PANDOC environment variable if pandoc is not in PATH. Verify before relying: - Performance characteristics when converting large files or batch operations - Compatibility with all pandoc output formats (odt, docx, epub, pdf) on all supported platforms ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 8.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags document format conversion, markdown to html converter, pandoc python wrapper, convert docx to pdf, document file conversion library, document-conversion, pandoc-wrapper [View on SkillFed](https://skillfed.io/packages/pypandoc) · [View on PyPI](https://pypi.org/project/pypandoc/)