Pandoc
In-depth entryby John MacFarlane · CLI tool
Universal document converter that translates between Markdown, LaTeX, HTML, DOCX, EPUB, Typst, Jupyter and dozens of other formats, with citeproc and Lua filters
Overview
Pandoc is a command-line document converter written in Haskell by John MacFarlane. It parses an input format into an internal abstract syntax tree and writes that tree out in another format, which is what lets it move between lightweight markup (its own extended Markdown, CommonMark, GitHub-flavored Markdown, reStructuredText, AsciiDoc, Org, djot), HTML and ebooks (HTML5, EPUB), TeX and XML (LaTeX, ConTeXt, DocBook, JATS), word processors (DOCX, ODT, RTF), Typst, Jupyter notebooks, wiki markups and slide formats. PDF output is produced through an external engine such as pdflatex, xelatex, lualatex, Typst or weasyprint.
Two features make it central to academic tooling. Built-in citation processing (citeproc) reads BibTeX, BibLaTeX, CSL JSON and other bibliography formats and renders citations in any of the thousands of CSL styles, so a Markdown manuscript can be rendered to a journal's Word template and to LaTeX from one source. Templates and filters customize everything else: Lua filters manipulate the document tree without external dependencies, and custom readers and writers can be written in Lua. Pandoc is the conversion engine underneath Quarto and R Markdown and is embedded in many static-site generators and editors.
Pandoc is released under the GPL version 2 or later and distributed as single binaries for macOS, Linux and Windows, as well as through Homebrew and most package managers. Its limits are those of lossy conversion: complex layouts, tracked changes and format-specific features do not round-trip perfectly, PDF output requires a separately installed engine, and large or deeply customized documents often need filters or template work to look right.
Capabilities
- Conversion among dozens of markup, office and ebook formats
- Citation rendering with citeproc and CSL styles
- Lua filters and custom readers/writers
- Templates for every output format
- PDF via LaTeX, Typst, ConTeXt or HTML engines
- Jupyter notebook and Typst read/write support
- Haskell library API
- Single-binary distribution for all major platforms
Typical workflows
- Markdown manuscript rendered to DOCX for a journal and to LaTeX for arXiv
- Converting a Word draft into Markdown for version control
- Generating HTML documentation from reStructuredText or Org
- Post-processing document trees with Lua filters in a build pipeline
Strengths
- One tool covers most conversion needs
- Robust citation support independent of LaTeX
- Scriptable and dependency-light
- GPL-licensed with a long maintenance history
Limitations
- Conversion is lossy for complex layouts and tracked changes
- PDF output requires an external engine
- Custom appearance often needs templates or filters
- Markdown dialect differences can surprise users
Prerequisites
- Pandoc binary; a TeX distribution or Typst for PDF
Who it is for
- Academic authors writing in Markdown
- Technical writers and documentation engineers
- Developers of publishing pipelines
Alternatives & comparison
Quarto and R Markdown are authoring systems that execute code and then call Pandoc for rendering; Typst is a complete typesetting system rather than a converter, though Pandoc can write Typst. TeX Live provides the LaTeX engines Pandoc uses for PDF.
- biblatex
LaTeX bibliography package that reimplements BibTeX formatting in LaTeX macros, with the Biber backend, Unicode sorting and multiple bibliographies
Open sourceFree - Quarto
Open-source scientific publishing system from Posit that renders Markdown with executable Python, R, Julia or Observable code to HTML, PDF, Word, slides, websites and books via Pandoc
Open sourceFree - R Markdown
R package that turns Markdown documents with embedded R (and Python or SQL) chunks into HTML, PDF, Word, slides, books and dashboards through knitr and Pandoc
Open sourceFree - TeX Live
The comprehensive free TeX distribution for Linux, macOS and Windows, released yearly with the tlmgr package manager and all major engines, packages and fonts
Open sourceFree - Typst
Markup-based typesetting system with an Apache-2.0 compiler written in Rust and a collaborative web app, positioned as a faster, simpler alternative to LaTeX
MixedFree
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Licensejgm/pandoc COPYRIGHTchecked Nov 1, 2026
https://github.com/jgm/pandoc/blob/main/COPYRIGHT
Supports: license_spdx, source_model
- Official documentationchecked Nov 1, 2026
- Official sitechecked Nov 1, 2026
- Repositorychecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in LaTeX & typesetting
Overleaf
Overleaf (Digital Science) · LaTeX & typesetting
Collaborative online LaTeX editor with real-time co-editing, templates and reference-manager sync, available as a hosted service and an AGPL self-hosted edition
JabRef
JabRef e.V. and contributors · Citation management
Open-source, BibTeX/biblatex-native reference manager for LaTeX users with online fetchers, groups, file linking and editor integration
Sphinx
Sphinx team · Documentation tooling
Python documentation generator using reStructuredText or MyST Markdown with cross-referencing, API autodoc and output to HTML, PDF via LaTeX, ePub and man pages
biblatex
Philip Kime and contributors · LaTeX & typesetting
LaTeX bibliography package that reimplements BibTeX formatting in LaTeX macros, with the Biber backend, Unicode sorting and multiple bibliographies
TeXstudio
TeXstudio contributors · LaTeX & typesetting
Open-source desktop LaTeX editor with integrated PDF viewer, autocompletion, wizards, spell checking and a structure view for Windows, macOS and Linux