Pandoc is the universal document converter, capable of transforming between dozens of markup formats including Markdown, HTML, LaTeX, DOCX, EPUB, reStructuredText, and PDF. It understands the semantics of each format, producing high-fidelity conversions rather than naive text transformations.
AI agents use Pandoc to convert documentation between formats — turning Markdown into PDF reports, converting HTML pages to clean Markdown for processing, or generating DOCX files from structured text. Its ability to handle complex documents with citations, tables, math equations, and cross-references makes it far more capable than simple format converters.
Pandoc’s template system and Lua filter support enable deep customization of output formatting. It can also extract metadata from documents, split or combine files, and process entire directories of documents in batch — making it a versatile tool for document-heavy automation workflows.