explaingit

jgm/pandoc

Analysis updated 2026-06-20

43,932HaskellAudience · writerComplexity · 2/5LicenseSetup · easy

TLDR

Command-line tool that converts documents between dozens of formats, Markdown to PDF, Word to EPUB, LaTeX to HTML, and many more, in a single command.

Mindmap

mindmap
  root((Pandoc))
    Input formats
      Markdown variants
      HTML LaTeX
      DOCX EPUB
      Org Jupyter
    Output formats
      PDF via LaTeX
      DOCX EPUB
      HTML slides
      Man pages
    Features
      Lua filters
      Bibliography
      Math notation
      Custom templates
    Audience
      Writers academics
      Docs teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Convert Markdown notes into a polished Word document or PDF for sharing with non-technical colleagues.

USE CASE 2

Generate HTML documentation from reStructuredText or Markdown source files as part of a docs pipeline.

USE CASE 3

Write a research paper in LaTeX or plain text and produce both a PDF and an EPUB ebook from the same source.

USE CASE 4

Author slide presentations in Markdown and output them as Beamer PDF slides or PowerPoint files.

What is it built with?

Haskell

How does it compare?

jgm/pandockoalaman/shellcheckpostgrest/postgrest
Stars43,93239,38827,071
LanguageHaskellHaskellHaskell
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencewriterops devopsvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Free to use and modify, but any distributed versions must also be open-sourced under the same GPL license.

In plain English

Pandoc is a command-line tool and Haskell library for converting documents between different markup and file formats, the "universal markup converter." The core problem it solves is document format lock-in: you might have content in Markdown that needs to become a Word document, or a LaTeX file that needs to be an EPUB ebook, or a Jupyter notebook that should become a PDF. Without Pandoc, each conversion requires a different tool or a painful manual process. Pandoc works by first parsing the source document into its own internal abstract representation of the content (a kind of format-neutral document model), and then rendering that representation into the target format. This two-step approach means a single conversion engine handles dozens of formats without each needing to know about all the others. The input formats it reads are extensive: Markdown (in several flavors including CommonMark, GitHub-Flavored, and MultiMarkdown), HTML, LaTeX, reStructuredText, EPUB, DOCX (Word), ODT (LibreOffice), PowerPoint, AsciiDoc, MediaWiki and other wiki markups, Org mode, Jupyter notebooks, CSV tables, bibliography formats like BibTeX and RIS, and more. The output formats include HTML, PDF (via LaTeX or other intermediaries), DOCX, EPUB, Beamer slide presentations, man pages, Typst, and many others. Beyond simple conversion, Pandoc supports bibliography management through integration with citation styles, applies templates for custom output styling, accepts Lua filters that let you programmatically transform the internal document model during conversion, and can handle mathematical notation. Writers and academics reach for Pandoc to convert their Markdown notes into polished PDFs or Word documents. Documentation teams use it to generate HTML documentation from reStructuredText or Markdown source. It is particularly popular in scientific and academic writing workflows where content is authored in plain text but needs to be delivered in multiple formats. The tool is written in Haskell and installable via Homebrew, package managers, or pre-built binaries.

Copy-paste prompts

Prompt 1
Using pandoc, convert my markdown file to a Word document with a custom reference template that matches my company's formatting style.
Prompt 2
Show me how to use a pandoc Lua filter to automatically add a table of contents and number all section headings in my HTML output.
Prompt 3
I have a folder of Markdown blog posts. Give me a pandoc shell command to batch-convert them all to HTML with a consistent header and footer template.
Prompt 4
How do I use pandoc to convert a LaTeX file with BibTeX citations to a clean PDF, preserving all references and formatting?
Prompt 5
Write a pandoc Lua filter that transforms all blockquotes in my document into styled callout boxes in the HTML output.

Frequently asked questions

What is pandoc?

Command-line tool that converts documents between dozens of formats, Markdown to PDF, Word to EPUB, LaTeX to HTML, and many more, in a single command.

What language is pandoc written in?

Mainly Haskell. The stack also includes Haskell.

What license does pandoc use?

Free to use and modify, but any distributed versions must also be open-sourced under the same GPL license.

How hard is pandoc to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pandoc for?

Mainly writer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub jgm on gitmyhub

Verify against the repo before relying on details.