About mdBook
mdBook is a command line tool that creates books from Markdown. It is aimed at product or API documentation, tutorials, course materials and anything else that needs a clean, navigable presentation.
The output has integrated search and color syntax highlighting for code blocks in many languages. Theme files let you customize the formatting, preprocessors can add custom syntax or modify content, and backends can render the book to multiple formats. Rust code samples can be tested automatically.
It is written in Rust and used by the Rust programming language project for its own book. The source and documentation are released under the Mozilla Public License v2.0, and the documentation site shows version 0.5.4.
The documentation site itself is an example of what mdBook produces. It offers keyboard shortcuts for moving between chapters and searching, and several color themes: Light, Rust, Coal, Navy and Ayu. Contributions are handled on GitHub, where bugs and feature requests are posted on the issue tracker and the project relies on the community to fix bugs and add features.
Key features
- Books written in lightweight Markdown
- Integrated search and syntax highlighting
- Customizable theme files
- Preprocessors for custom syntax
- Multiple output formats through backends
- Automated testing of Rust code samples
Good fit for
- API and product documentation
- Tutorials and course materials
- Rust project books
mdBook: questions and answers
- What is mdBook used for?
- mdBook is a command line tool written in Rust that builds books and documentation sites from Markdown, with search and themes. It is a good fit for API and product documentation, tutorials and course materials, and Rust project books.
- Is mdBook open source?
- Yes. mdBook is open source under the MPL-2.0 licence. Its source code is on GitHub at rust-lang/mdBook and is written mainly in Rust.
- Is mdBook free?
- Yes. mdBook is open source, so the software itself is free to use.
- Can I self-host mdBook?
- Yes. mdBook can be self-hosted on your own server or infrastructure.
- What is mdBook an alternative to?
- mdBook is an open-source alternative to GitBook and Swimm. Other open-source alternatives to GitBook include GitBook, Outline and Wiki.js.
- Is mdBook actively maintained?
- Yes. The most recent commit to mdBook was on 12 November 2026, and the latest release is v0.5.4, published on 6 July 2026. The project has 22k stars on GitHub, with 77 added in the last 30 days.
Open-source alternatives to mdBook
See all
GitBook
Docs & Wikis
The open source frontend for GitBook doc sites
GPL-3.0vs GitBook★ 29k
Hugo
CMS
The world’s fastest framework for building websites.
Apache-2.0vs Squarespace★ 90k
Outline
Docs & Wikis
The fastest knowledge base for growing teams. Beautiful, realtime collaborative, feature p
OSSvs Confluence★ 41k
Wiki.js
Docs & Wikis
Wiki.js | Next Generation Open Source Wiki
AGPL-3.0vs Confluence★ 29k
Sphinx
Docs & Wikis
The Sphinx documentation generator
OSSvs Document360★ 8.1k
Docfx
Docs & Wikis
Static site generator for .NET API documentation.
MITvs Bump.sh★ 4.5k

GitBook
Swimm