explaingit

jgm/pandoc

📈 Trending44,208HaskellAudience · writerComplexity · 2/5ActiveLicenseSetup · hard

TLDR

Universal document converter that transforms between 30+ markup and file formats, Markdown to Word, LaTeX to PDF, Jupyter to EPUB, and more, without format lock-in.

Mindmap

mindmap
  root((Pandoc))
    Input Formats
      Markdown flavors
      HTML LaTeX
      EPUB DOCX
      Notebooks CSV
    Output Formats
      PDF DOCX EPUB
      HTML Beamer
      Man pages Typst
    How It Works
      Parse to abstract model
      Render to target format
      Lua filters for transforms
    Use Cases
      Academic writing
      Documentation generation
      Batch conversions
    Key Features
      Bibliography management
      Custom templates
      Math notation support

Things people build with this

USE CASE 1

Convert Markdown notes into polished PDFs or Word documents for sharing with colleagues.

USE CASE 2

Generate HTML documentation from reStructuredText or Markdown source files automatically.

USE CASE 3

Transform Jupyter notebooks into EPUB ebooks or PDF reports for distribution.

USE CASE 4

Batch-convert academic papers between LaTeX, DOCX, and HTML for different submission formats.

Tech stack

HaskellLaTeXLua

Getting it running

Difficulty · hard Time to first run · 1day+

Haskell build system and LaTeX dependencies are complex to install and compile from source.

Use freely for any purpose, including commercial use, as long as you include the copyright notice and license text.

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
How do I use Pandoc to convert a Markdown file with citations into a formatted PDF with a bibliography?
Prompt 2
Show me how to write a Lua filter for Pandoc that automatically converts all level-2 headings to uppercase during conversion.
Prompt 3
I have 50 Markdown files. How do I use Pandoc to convert them all to DOCX at once with a custom template?
Prompt 4
How do I configure Pandoc to convert a Jupyter notebook to an HTML slide presentation with custom CSS styling?
Prompt 5
What's the simplest way to convert a LaTeX document to EPUB using Pandoc from the command line?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.