a universal document converter
open sourceGPL-2.0-or-laterself-hostablefree
Pandoc is a Haskell library and command-line tool by John MacFarlane that converts between dozens of markup and word-processing formats, among them Markdown, HTML, LaTeX, Word .docx, ODT, EPUB, reStructuredText, AsciiDoc, Org, Jupyter notebooks and Typst. Readers parse each input into an abstract syntax tree and writers render it, so Lua filters can change a document in between, and its citeproc support formats citations and bibliographies in CSL styles. It makes PDFs through an external engine: a LaTeX engine by default, or ConTeXt, groff, Typst, or HTML engines such as WeasyPrint and Prince. For Word input, --track-changes=accept (the default) applies tracked changes, reject drops them and all keeps insertions, deletions and comments as spans with insertion and deletion classes. It also runs as an HTTP server (pandoc-server) and in the browser as WebAssembly at pandoc.org/app.
Ways to install
Package managers
Problems it solves
- convert a Markdown file to a Word document that uses my company's styles
- turn a Word document into clean Markdown for our docs site
- write my thesis in Markdown with citations and get a PDF formatted to the journal's style
- convert LaTeX to Word for a co-author who only uses Word
- build an EPUB ebook from a folder of Markdown chapters
- keep the tracked insertions and deletions from a Word file when converting it to another format
- only accept the changes one reviewer made in a .docx before converting it
- make a slide deck from Markdown as reveal.js, Beamer or PowerPoint
- batch convert hundreds of HTML pages into Markdown from a script
- rewrite headings or links across a document during conversion with a small script
- convert Jupyter notebooks to HTML, Word or PDF
- generate PDFs from Markdown in CI with Typst or LaTeX
- convert reStructuredText or AsciiDoc documentation to Markdown
- turn a CSV or Excel sheet into a Markdown or HTML table
- offer document conversion as an HTTP service inside our network
- convert documents in the browser without uploading them anywhere
- format a bibliography from BibTeX or CSL JSON in any output format
Features
- converts between dozens of formats: Markdown flavours, HTML, LaTeX, docx, ODT, RTF, EPUB, reStructuredText, AsciiDoc, Org, Typst, Jupyter and more
- reads CSV, TSV and Excel xlsx as tables
- PDF output through LaTeX, ConTeXt, groff, Typst, WeasyPrint, Prince, pagedjs-cli or wkhtmltopdf
- --track-changes=accept|reject|all for Word tracked changes and comments
- Lua filters and JSON filters that transform the document tree
- custom readers and writers written in Lua
- citations and bibliographies with CSL styles from BibTeX, BibLaTeX, CSL JSON or YAML
- templates for standalone output and --reference-doc for docx, ODT and pptx styles
- slide shows: reveal.js, Beamer, PowerPoint and others
- pandoc-server: an HTTP server mode
View 2 more
- pandoc.wasm in the browser at pandoc.org/app
- Haskell library on Hackage
Limitations
- Doesn't make PDFs by itself: it needs an external engine such as LaTeX, Typst, WeasyPrint or groff installed5
- Doesn't keep formatting details such as margins when converting: it keeps structure, so conversions from richer formats like Word are lossy5
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Takes plugins | plan not known |
| Has official SDKs | plan not known |
Alternatives
The same job
These do what Pandoc does.
- Aspose.Words Create, edit, render and convert Word documents to multiple formats without using external software
- LibreOffice Free and private office suite, no forced AI