pandoc
Haskell library and command-line tool that converts documents between dozens of markup formats, including Markdown, LaTeX, HTML, docx, EPUB and PDF.
Pandoc is a Haskell library and a command-line tool built on it for converting documents from one markup format to another. It reads a large set of input formats, including Markdown variants (Pandoc's Markdown, CommonMark, GitHub-Flavored Markdown, MultiMarkdown), HTML, LaTeX, docx, odt, epub, pptx, xlsx, reStructuredText, AsciiDoc, Org mode, Jupyter notebooks, DocBook, JATS, MediaWiki, Typst, and bibliography formats such as BibTeX and CSL JSON. Formats are selected by name, for example markdown, docx, or latex.
It writes to a similarly broad set of output formats: HTML5/HTML4, LaTeX, docx, odt, EPUB 2 and 3, PowerPoint, Beamer, reveal.js, Slidy, DZSlides and S5 slide shows, man and ms pages, Texinfo, ICML, TEI, several BBCode dialects, and wiki markups. It can also produce PDF through LaTeX, Groff ms, or HTML, and ANSI-escaped text for terminal viewing. Custom readers and writers can be supplied as Lua scripts, and the README mentions Lua filters for modifying documents during conversion.
Pandoc's own extended Markdown adds syntax for tables, definition lists, metadata blocks, footnotes, citations, and math. The tool suits technical writers, researchers, documentation maintainers, and developers who need to convert or publish documents across formats, for example Markdown to docx, PDF, or slides, or as a build step in a documentation pipeline.
Installation
# via Homebrew
brew install pandoc
Alternatives & related tools
jq
Command-line JSON processor for slicing, filtering, mapping and transforming structured data
fx
Terminal-based JSON processor and viewer for querying, filtering, and manipulating JSON data interactively.
yq
Command-line YAML, JSON, XML, and CSV processor with jq-like syntax for querying and transforming structured data
gron
Transforms JSON into discrete assignments to make it greppable and enable exploration of complex JSON structures
pgcli
Interactive PostgreSQL client with auto-completion, syntax highlighting, and smart context-sensitive suggestions.
add a badge to your README
Maintain pandoc? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/pandoc?utm_source=badge)<a href="https://www.trmn.sh/tools/pandoc?utm_source=badge"><img src="https://www.trmn.sh/badge/pandoc.svg" alt="Featured on trmn" height="20"></a>