<div align="center">
<img src="assets/logo.png" alt="carta logo" width="140" height="140">
# carta
**A universal document converter written in Rust.** Read a markup format, render it back out in another. A performant and lightweight reimplementation of [pandoc](https://pandoc.org).
[](https://crates.io/crates/carta)
[](https://docs.rs/carta)
[](https://github.com/mfkrause/carta/actions/workflows/ci.yml)
[](LICENSE)

</div>
> [!WARNING]
> carta is an **early-stage alpha under active development**. Not all of pandoc's formats are implemented yet and the API is still unstable.
## Goals
- **Performance** and a **smaller binary** than pandoc.
- **Feature parity** with pandoc across all formats and extensions.
- A **developer-friendly library**, with the CLI as a thin shell over it.
## Status
This tracks carta's status of all formats pandoc supports. See [`STATUS.md`](docs/STATUS.md) for a detailed per-format breakdown including extension coverage, and the full feature backlog.
โ
usable โ basically done; any remaining parity gaps are minor and unlikely to affect regular use ยท ๐ง in development โ large parity gaps or breaking issues (e.g. panics), not recommended for use yet ยท โ not started ยท โ not applicable (pandoc has no such direction)
**Markdown family**
| CommonMark (`commonmark`) | โ
| โ
|
| CommonMark-X (`commonmark_x`) | โ
| โ
|
| GitHub-Flavored Markdown (`gfm`) | โ
| โ
|
| Pandoc Markdown (`markdown`) | โ
| โ
|
| Markdown strict (`markdown_strict`) | โ
| โ
|
| MultiMarkdown (`markdown_mmd`) | โ
| โ
|
| PHP Markdown Extra (`markdown_phpextra`) | โ
| โ
|
| GitHub Markdown, legacy (`markdown_github`) | โ
| โ
|
| Djot (`djot`) | โ | โ |
| Markua (`markua`) | โ | โ |
**HTML & slides**
| HTML (`html`, `html5`, `html4`) | โ
| โ
|
| Chunked HTML (`chunkedhtml`) | โ | โ |
| reveal.js (`revealjs`) | โ | โ
|
| Beamer (`beamer`) | โ | โ
|
| Slidy (`slidy`) | โ | โ |
| S5 (`s5`) | โ | โ |
| Slideous (`slideous`) | โ | โ |
| DZSlides (`dzslides`) | โ | โ |
| PowerPoint (`pptx`) | โ | โ |
**TeX & typesetting**
| LaTeX (`latex`) | โ
| โ
|
| Typst (`typst`) | โ | โ
|
| ConTeXt (`context`) | โ | โ |
| Texinfo (`texinfo`) | โ | โ |
| PDF (`pdf`) | โ | โ |
**Lightweight markup**
| reStructuredText (`rst`) | โ
| โ
|
| AsciiDoc (`asciidoc`) | โ | โ
|
| AsciiDoc legacy (`asciidoc_legacy`) | โ | โ |
| Asciidoctor (`asciidoctor`) | โ | โ |
| Org mode (`org`) | โ
| โ
|
| Textile (`textile`) | โ | โ |
| Muse (`muse`) | โ | โ |
| Haddock (`haddock`) | โ | โ |
| txt2tags (`t2t`) | โ | โ |
| Perl POD (`pod`) | โ | โ |
**Wikis**
| MediaWiki (`mediawiki`) | โ
| โ
|
| DokuWiki (`dokuwiki`) | โ
| โ
|
| Jira (`jira`) | โ
| โ
|
| Creole (`creole`) | โ | โ |
| TikiWiki (`tikiwiki`) | โ | โ |
| TWiki (`twiki`) | โ | โ |
| Vimwiki (`vimwiki`) | โ | โ |
| XWiki (`xwiki`) | โ | โ |
| ZimWiki (`zimwiki`) | โ | โ |
**roff**
| man (`man`) | โ
| โ
|
| mdoc (`mdoc`) | โ | โ |
| ms (`ms`) | โ | โ |
| vimdoc (`vimdoc`) | โ | โ |
**Word processor, ebook & notebook**
| Word (`docx`) | โ | โ |
| OpenDocument Text (`odt`) | โ | โ |
| OpenDocument (`opendocument`) | โ | โ |
| EPUB (`epub`, `epub2`, `epub3`) | โ | โ
|
| Jupyter Notebook (`ipynb`) | โ
| โ
|
| FictionBook2 (`fb2`) | โ | โ |
| InDesign ICML (`icml`) | โ | โ |
| Rich Text Format (`rtf`) | โ | โ |
| Spreadsheet (`xlsx`) | โ | โ |
**XML & publishing**
| DocBook (`docbook`, `docbook4`, `docbook5`) | โ | โ |
| JATS (`jats`, `jats_archiving`, `jats_articleauthoring`, `jats_publishing`) | โ | โ |
| BITS (`bits`) | โ | โ |
| TEI (`tei`) | โ | โ |
| Generic XML (`xml`) | โ | โ |
**Bibliography**
| BibTeX (`bibtex`) | โ | โ |
| BibLaTeX (`biblatex`) | โ | โ |
| CSL JSON (`csljson`) | โ | โ |
| RIS (`ris`) | โ | โ |
| EndNote XML (`endnotexml`) | โ | โ |
**Data, interchange & terminal**
| Pandoc JSON (`json`) | โ
| โ
|
| Native Pandoc AST (`native`) | โ
| โ
|
| OPML (`opml`) | โ
| โ
|
| CSV (`csv`) | โ
| โ |
| TSV (`tsv`) | โ
| โ |
| Plain text (`plain`) | โ | โ
|
| BBCode (`bbcode`, `bbcode_phpbb`, `bbcode_steam`, โฆ) | โ | โ |
| ANSI terminal (`ansi`) | โ | โ |
## Installation
### Prebuilt binaries
Download the archive for your platform from the [latest release][latest-release]. Builds are provided for Linux (x86-64 gnu and static musl, arm64), macOS (Intel and Apple Silicon), and Windows (x86-64).
### From crates.io
```sh
cargo install carta
```
This installs the `carta` binary. For a smaller build, pass `--no-default-features` with only the formats you need, e.g. `--features cli,read-commonmark,write-html`.
### From source
```sh
git clone https://github.com/mfkrause/carta
cd carta
cargo build --release
# binary at target/release/carta
```
[latest-release]: https://github.com/mfkrause/carta/releases/latest
## Usage
### Command line
```sh
# CommonMark to HTML
carta -f commonmark -t html input.md -o output.html
# read from stdin, write to stdout
# inspect the document model
carta -f commonmark -t json input.md
# standalone document with a table of contents and numbered sections
carta -f commonmark -t html -s --toc --number-sections input.md -o output.html
# render HTML math with MathJax (or --katex)
carta -f commonmark -t html -s --mathjax input.md -o output.html
# extract a notebook's embedded images to files, rewriting the references
carta -f ipynb -t markdown --extract-media=media notebook.ipynb -o notebook.md
# transform the document through a JSON filter before writing (repeatable, applied in order)
carta -f commonmark -t html -F ./my-filter.py input.md -o output.html
# discover what this build supports
carta --list-input-formats
carta --list-output-formats
carta --list-extensions # extensions for the Markdown dialect
carta --list-extensions=gfm # extensions and defaults for a given format
```
### Library
```rust
use carta::{convert_text, ReaderOptions, WriterOptions};
let html = convert_text(
"commonmark",
"html",
"# Hello, *world*",
&ReaderOptions::default(),
&WriterOptions::default(),
)?;
```
`convert_text` is the shortcut for text-to-text conversion. The general entry point is `convert`, which takes raw bytes and returns an `Output` that is text or bytes depending on the target format โ use it when either side is a binary format.
You can select formats at compile time via per-direction features to make binaries even more lightweight for your individual needs.
```sh
cargo build -p carta --no-default-features --features read-commonmark,write-html
```
## Development
```sh
cargo build # build the workspace
cargo nextest run --workspace # run tests
cargo clippy --all-targets # lint
cargo +nightly fuzz run commonmark # fuzz a reader (see fuzz/README.md)
```
The workspace splits into `carta-ast` (the document model), `carta-core` (shared traits and options), `carta-readers`, `carta-writers`, and `carta` (the library facade, which also ships the command-line binary behind its `cli` feature).
## License
Copyright ยฉ 2026 Maximilian Krause.
carta is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. See [`LICENSE`](LICENSE) for the full text.