# pandoc

> Haskell library and command-line tool that converts documents between dozens of markup formats, including Markdown, LaTeX, HTML, docx, EPUB and PDF.

Stars: 46.7k · Language: Haskell · License: GPL-2.0 · Categories: Data

- Repository: https://github.com/jgm/pandoc
- Website: https://pandoc.org
- Page: https://www.trmn.sh/tools/pandoc

## Install

- Homebrew: `brew install pandoc`

## Overview

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

```bash
# via Homebrew
brew install pandoc
```

## Alternatives

- [jq](https://www.trmn.sh/tools/jq.md): Command-line JSON processor for slicing, filtering, mapping and transforming structured data (C, 36.0k stars)
- [fx](https://www.trmn.sh/tools/fx.md): Terminal-based JSON processor and viewer for querying, filtering, and manipulating JSON data interactively. (Go, 20.7k stars)
- [yq](https://www.trmn.sh/tools/yq.md): Command-line YAML, JSON, XML, and CSV processor with jq-like syntax for querying and transforming structured data (Go, 16.2k stars)
- [gron](https://www.trmn.sh/tools/gron.md): Transforms JSON into discrete assignments to make it greppable and enable exploration of complex JSON structures (Go, 14.5k stars)
- [pgcli](https://www.trmn.sh/tools/pgcli.md): Interactive PostgreSQL client with auto-completion, syntax highlighting, and smart context-sensitive suggestions. (Python, 13.4k stars)

---

Canonical: https://www.trmn.sh/tools/pandoc
