Utilities
Convert documents between common text formats
One document in, a different document format out.
overview
What pandoc does
Pandoc reads one connected document and writes the selected output format to the node result. Set --from when the source format cannot be inferred and --to for the required result, such as html, markdown, docx, or epub.
Enable --standalone when the result needs a complete document header and footer rather than a fragment. A connected --template can control the structure of formats that support Pandoc templates.
Pandoc handles document structure and markup conversion. It is not an office rendering engine, OCR system, or pixel-perfect PDF converter.
source github.com/jgm/pandoc
use cases
Where pandoc fits
Publish Markdown as HTML
Turn generated Markdown reports into standalone HTML documents for delivery or archiving.
Normalize document formats
Convert heterogeneous text documents into one downstream format before parsing or review.
Create editable deliverables
Write structured content as DOCX or EPUB without maintaining a dedicated converter service.
reference
pandoc inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | --input | Input document file. |
| from | STRING | --from | Explicit input format. |
| to | STRING | --to | Required output format. |
| standalone | BOOLEAN | --standalone | Produce a complete standalone document. |
Showing key inputs. pandoc exposes 5 inputs in total.
Full flag reference (5 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | --input | Input document file |
| from | STRING | --from | Input format such as markdown, html, or docx |
| to | STRING | --to | Output format such as html, markdown, docx, or epub |
| template | FILE | --template | Pandoc template file |
| standalone | BOOLEAN | --standalone | Produce a standalone document with header and footer |
example
Run pandoc
pandoc input.md --from markdown --to html --standalone --output output.html<h1 id="batch-proof">Batch proof</h1><p>Pandoc works.</p>guidance
Choosing pandoc
Use Pandoc for semantic conversion between structured text and document formats. Use LibreOffice when office-suite rendering fidelity matters.
libreoffice
Renders office documents and exports them through LibreOffice filters.
weasyprint
Turns HTML and CSS into paginated PDF output.
pdftotext
Extracts text from an existing PDF instead of creating one.
faq
pandoc questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run pandoc yourself
A Markdown fixture is converted into a standalone HTML document and checked for its expected heading and paragraph.
Facts on this page come from the live Trickest tool library.