Five things people actually use it for

Grouped by what you're trying to do rather than by what pandoc emits. Every command here was run against a real pandoc before it went on the page.

Pandoc's own demos page has more, each with the output file to download and open.

Write a paper and hand it in as Word

Your supervisor wants .docx. You do not want to write in Word, and you especially do not want to hand-format a bibliography.

Draft in Markdown, hand in Word

pandoc paper.md -o paper.docx

With citations resolved from a .bib file

pandoc paper.md --citeproc --bibliography=refs.bib -o paper.docx

In a specific journal's citation style

pandoc paper.md --citeproc --bibliography=refs.bib --csl=apa.csl -o paper.docx

Citations work in every output format, not just this one. Styles come from the CSL project's repository of several thousand.

Turn notes into a slide deck

You have a talk written as a list of points and forty minutes before you give it.

An HTML deck that runs in a browser

pandoc talk.md -t revealjs -s -o talk.html

A PDF deck, typeset through LaTeX

pandoc talk.md -t beamer -o talk.pdf

PowerPoint, because the conference asked for it

pandoc talk.md -o talk.pptx

Every second-level heading starts a new slide, so structuring the talk and structuring the deck are the same act. Note the -t on the first two: the file extension alone would give you plain HTML and an ordinary PDF.

Get a Word document into plain text you can diff

Someone sent you a .docx with tracked changes and you would like it in version control.

Straight across

pandoc report.docx -o report.md

Keeping the embedded images

pandoc report.docx --extract-media=./media -o report.md

Accepting tracked changes on the way through

pandoc report.docx --track-changes=accept -o report.md

--track-changes also takes reject and all; all keeps both versions inline so you can see what was edited.

Make an ebook out of a folder of chapters

You have chapters as separate files and want one EPUB.

Every chapter, in order, into one book

pandoc chapters/*.md -o book.epub

With metadata and a cover

pandoc chapters/*.md --metadata title="My Book" --epub-cover-image=cover.jpg -o book.epub

Pandoc concatenates multiple inputs in the order you list them, so shell globbing does the table of contents for you. An EPUB without a title is valid and looks broken in most readers.

Publish a document as a web page

You want a readable page, not a fragment to paste into a CMS.

A complete page rather than a fragment

pandoc doc.md -s -o doc.html

With a table of contents and your own stylesheet

pandoc doc.md -s --toc -c style.css -o doc.html

Maths rendered properly

pandoc doc.md -s --mathjax -o doc.html

Without -s you get body HTML with no <head> and no <title>. That's the right output for templating and the wrong one for opening in a browser.

Run any of them here

The buttons above load the example into pandoc's official WebAssembly build and convert it in this tab. The commands that need a file you don't have — a bibliography, a reference .docx, a folder of chapters — are listed but can't be run from a text box, and a PDF needs a TeX engine that isn't in the browser build.

This runs pandoc itself — the real binary, compiled to WebAssembly — inside this tab. Nothing you type is uploaded, because there's nowhere for it to go.

It's a 15MB download the first time, so it's not fetched until you ask for it. On mobile data you may want to wait.

Want a pair that isn't here? The converter builds the command for any combination.