If you need to convert files from one markup format into another, pandoc is your swiss-army knife. Pandoc can convert between the following formats:
(β = conversion from; β = conversion to; βοΈ = conversion from and to)
- Lightweight markup formats
-
βοΈ Markdown (including CommonMark and GitHub-flavored Markdown)
βοΈ reStructuredText
βοΈ AsciiDoc
βοΈ Emacs Org-Mode
βοΈ Emacs Muse
βοΈ Textile
β Markua
β txt2tags
βοΈ djot
β BBCode - HTML formats
-
βοΈ (X)HTML 4
βοΈ HTML5
β Chunked HTML - Ebooks
-
βοΈ EPUB version 2 or 3
βοΈ FictionBook2 - Documentation formats
-
β GNU TexInfo
β pod
βοΈ Haddock markup
β Vimdoc - Roff formats
- TeX formats
- XML formats
-
βοΈ DocBook version 4 or 5
βοΈ JATS
β BITS
β TEI Simple
β OpenDocument XML - Outline formats
-
βοΈ OPML
- Bibliography formats
-
βοΈ BibTeX
βοΈ BibLaTeX
βοΈ CSL JSON
βοΈ CSL YAML
β RIS
β EndNote XML
- Word processor formats
-
βοΈ Microsoft Word docx
βοΈ Rich Text Format RTF
βοΈ OpenOffice/LibreOffice ODT - Interactive notebook formats
-
βοΈ Jupyter notebook (ipynb)
- Page layout formats
-
β InDesign ICML
βοΈ Typst - Wiki markup formats
-
βοΈ MediaWiki markup
βοΈ DokuWiki markup
β TikiWiki markup
β TWiki markup
β Vimwiki markup
β XWiki markup
β ZimWiki markup
βοΈ Jira wiki markup
β Creole - Slide show formats
-
β LaTeX Beamer
βοΈ Microsoft PowerPoint
β Slidy
β reveal.js
β Slideous
β S5
β DZSlides - Data formats
-
β CSV tables
β TSV tables
β Microsoft Excel spreadsheets - Terminal output
-
β ANSI-formatted text
- Serialization formats
-
βοΈ Haskell AST
βοΈ JSON representation of AST
βοΈ XML representation of AST - Custom formats
-
βοΈ custom readers and writers can be written in Lua
-
β via
pdflatex,lualatex,xelatex,latexmk,tectonic,wkhtmltopdf,weasyprint,prince,pagedjs-cli,context, orpdfroff.
Pandoc understands a number of useful markdown syntax extensions, including document metadata (title, author, date); footnotes; tables; definition lists; superscript and subscript; strikeout; enhanced ordered lists (start number and numbering style are significant); running example lists; delimited code blocks with syntax highlighting; smart quotes, dashes, and ellipses; markdown inside HTML blocks; and inline LaTeX. If strict markdown compatibility is desired, all of these extensions can be turned off.
LaTeX math (and even macros) can be used in markdown documents. Several different methods of rendering math in HTML are provided, including MathJax and translation to MathML. LaTeX math is converted (as needed by the output format) to unicode, native Word equation objects, MathML, or roff eqn.
Pandoc includes a powerful system for automatic citations and bibliographies. This means that you can write a citation like
[see @doe99, pp. 33-35; also @smith04, ch. 1]
and pandoc will convert it into a properly formatted citation using any of hundreds of CSL styles (including footnote styles, numerical styles, and author-date styles), and add a properly formatted bibliography at the end of the document. The bibliographic data may be in BibTeX, BibLaTeX, CSL JSON, or CSL YAML format. Citations work in every output format.
There are many ways to customize pandoc to fit your needs, including a template system and a powerful system for writing filters.
Pandoc includes a Haskell library and a standalone command-line program. The library includes separate modules for each input and output format, so adding a new input or output format just requires adding a new module.
Pandoc is free software, released under the GPL. Copyright 2006β2025 John MacFarlane.
