Sphinx
by Sphinx team · Application · also known as sphinx-doc
Python documentation generator using reStructuredText or MyST Markdown with cross-referencing, API autodoc and output to HTML, PDF via LaTeX, ePub and man pages
Overview
Sphinx is a documentation generator created for the Python language documentation and maintained by the Sphinx team under a BSD-2-Clause license. Source files are written in reStructuredText, or in Markdown through the MyST parser, and compiled into HTML, LaTeX and PDF, ePub, Texinfo and man pages. Its directive and role system provides semantic markup for code objects, cross-references that resolve across pages and even across projects (intersphinx), indices, glossaries and math rendering.
The autodoc extension pulls API documentation from Python docstrings, and domains exist for C, C++, JavaScript and other languages, which is why Sphinx remains the standard for scientific Python libraries and for projects hosted on Read the Docs. Themes such as Furo and PyData Sphinx Theme modernize the output. Sphinx's cost is complexity: reStructuredText syntax is stricter than Markdown, configuration in conf.py grows with extensions, and builds of large projects are slower than those of lighter generators. For a simple Markdown site MkDocs is often sufficient, but for documentation that needs rigorous cross-referencing or print output Sphinx is the more capable tool.
Capabilities
- reStructuredText and MyST Markdown sources
- Cross-references within and across projects (intersphinx)
- API documentation from docstrings (autodoc)
- Multiple output formats including PDF via LaTeX
- Extension and theme ecosystem
- Domains for several programming languages
Typical workflows
- Generate a scientific library's API reference with autodoc
- Build both a website and a PDF manual from one source
- Host versioned documentation on Read the Docs
Strengths
- Rigorous cross-referencing and indices
- Print-quality output through LaTeX
- Long-established with many extensions
Limitations
- reStructuredText has a learning curve
- Configuration grows complex with extensions
- Slower builds on large projects
Prerequisites
- Python; a LaTeX distribution for PDF output
Who it is for
- Python and scientific library maintainers
- Technical writers needing print output
Alternatives & comparison
MkDocs is simpler and Markdown-only, with API docs added through plugins; Docusaurus is React-based with versioning and localization built in. Quarto also produces HTML and PDF from a single source but is oriented to computational documents and reports rather than software reference documentation.
- Docusaurus
React-based static site generator from Meta for documentation sites with MDX content, versioning, localization and a plugin architecture
Open sourceOpen source - MkDocs
Python static site generator for project documentation that builds a navigable site from Markdown files and a single YAML configuration
Open sourceOpen source - Quarto
Open-source scientific publishing system from Posit that renders Markdown with executable Python, R, Julia or Observable code to HTML, PDF, Word, slides, websites and books via Pandoc
Open sourceFree
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Licensehttps://github.com/sphinx-doc/sphinx/blob/master/LICENSE.rstchecked Nov 1, 2026
Supports: license_spdx, source_model
- Official documentationchecked Nov 1, 2026
- Official sitechecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Documentation tooling
Pandoc
John MacFarlane · LaTeX & typesetting
Universal document converter that translates between Markdown, LaTeX, HTML, DOCX, EPUB, Typst, Jupyter and dozens of other formats, with citeproc and Lua filters
Mermaid
Mermaid project (Knut Sveidqvist and contributors) · Design & prototyping
JavaScript library that renders flowcharts, sequence, class, state, ER, Gantt and other diagrams from a Markdown-like text syntax