A universal document converter written in Rust. Read a markup format, render it back out in another. A fast, lightweight reimplementation of pandoc.
Warning
carta is still in active development. Not all of pandoc's formats and features are implemented yet and the API is still unstable.
- Performance and a lightweight binary.
- A developer-friendly library, with the CLI as a thin shell over it.
- Feature parity with pandoc across all formats and extensions.
carta already supports most of the most-used pandoc formats. The rest is in active development. See STATUS.md for a detailed breakdown.
Download the archive for your platform from the latest release. Builds are provided for Linux (x86-64 gnu and static musl, arm64), macOS (Intel and Apple Silicon), and Windows (x86-64).
With cargo-binstall, the matching prebuilt binary can be fetched directly:
cargo binstall cartacargo install cartaThis 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.
git clone https://github.com/mfkrause/carta
cd carta
cargo build --release
# binary at target/release/carta# CommonMark to HTML
carta -f commonmark -t html input.md -o output.html
# read from stdin, write to stdout
echo '# Hello' | carta -f commonmark -t html
# discover what this build supports
carta --list-input-formats
carta --list-output-formats
carta --list-extensions=gfmuse carta::{convert_text, ReaderOptions, WriterOptions};
let html = convert_text(
"commonmark",
"html",
"# Hello, *world*",
&ReaderOptions::default(),
&WriterOptions::default(),
)?;convert_text is a shortcut for text-to-text conversion. The more general entry point is convert, which takes raw bytes and returns an Output that is either text or bytes, depending on the target format.
You can select formats at compile time via per-direction features to shrink the binary:
cargo build -p carta --no-default-features --features read-commonmark,write-htmlcargo build # build the workspace
cargo nextest run --workspace # run tests
cargo clippy --all-targets # lintCopyright Β© 2026 Maximilian Krause.
Licensed under either of
- Apache License, Version 2.0 (
LICENSE-APACHEor http://www.apache.org/licenses/LICENSE-2.0) - MIT license (
LICENSE-MITor http://opensource.org/licenses/MIT)
at your option.
Note: The syntax-highlighting grammar files are third-party works that have their own upstream licenses. See vendor/syntax-highlighting/ATTRIBUTION.md.