What Is .rst
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 11, 2026
Key Facts
- Created in 2001 as part of the Python Docutils project by David Goodger
- Official documentation format for Python Enhancement Proposals (PEPs) since their inception
- Powers Sphinx documentation generator, used by thousands of Python projects and technology companies
- Supports conversion to 15+ output formats including HTML, PDF, LaTeX, EPUB, and XML
- Remains fully readable as plain text while supporting advanced features like directives, roles, and cross-document references
Overview
ReStructuredText (.rst) is a lightweight markup language designed for creating well-structured documents with a clean, readable syntax that functions well in both plaintext and converted formats. Created in 2001 by David Goodger as part of the Python Docutils project, it was developed to provide a standardized, non-proprietary way to write technical documentation that could be easily parsed and converted to multiple output formats including HTML, PDF, and LaTeX.
The format became the de facto standard for Python documentation, serving as the official format for Python Enhancement Proposals (PEPs) and becoming the foundational format for Sphinx, one of the most widely-used documentation generators in the industry. With over two decades of development and refinement, .rst files use intuitive markup conventions—such as asterisks for emphasis, underlines for section headings, and indentation for code blocks—making them highly readable even as plain text while simultaneously supporting complex document structures and cross-references.
How It Works
.rst documents use a hierarchy of markup elements that transform simple text into richly structured, cross-linked documents:
- Headings and Sections: Section headings are created using special characters (like equals signs or hyphens) placed both above and below the heading text, creating a natural visual hierarchy that automatically generates table of contents, navigation structures, and inter-document cross-references.
- Emphasis and Inline Formatting: Text formatting uses intuitive syntax where **double asterisks** create bold text, *single asterisks* create italic text, and ``double backticks`` format inline code for technical terms, variable names, and literal values within paragraphs.
- Code Blocks and Literal Text: Literal code blocks are created through simple indentation following a double colon (::), which preserves all whitespace and formatting while allowing optional syntax highlighting through language-specific directives for Python, JavaScript, and over 100 other programming languages.
- Directives and Extensions: Advanced features include directives (.. directive::) for complex content like images, tables, warnings, and code snippets, plus roles (:role:`text`) for inline references, cross-document links, and semantic markup of technical concepts.
- Lists, Tables, and References: Both simple bullet lists (using - or * characters) and complex multi-column tables with merged cells are supported natively, with reference markup for footnotes, citations, and hyperlinks distributed throughout documents.
Key Comparisons
| Feature | reStructuredText | Markdown | AsciiDoc |
|---|---|---|---|
| Standardization | Formal specification with reference implementation (Docutils) | Multiple competing variants with inconsistent syntax | Single specification maintained by AsciiDoc organization |
| Complexity Support | Extensive directives and roles for complex technical documents | Basic formatting with limited extensibility without extensions | Comprehensive features comparable to DocBook XML |
| Python Ecosystem | Official standard (Sphinx, PEPs, Python.org, major frameworks) | Growing adoption but not standard in Python community | Rarely adopted in Python projects or documentation |
| Learning Curve | Moderate; more syntax options than Markdown but well-documented | Very easy; minimal syntax for basic documents | Steep learning curve; requires extensive markup knowledge |
| Output Formats | 15+ formats including HTML, PDF, LaTeX, XML, EPUB via Docutils | Primarily HTML conversion with limited native support | HTML, PDF, EPUB, DocBook, man pages and others |
Why It Matters
- Python Community Standard: .rst is the official format for Python's entire technical documentation ecosystem, used continuously in PEPs since their inception and powering Sphinx documentation generators deployed across thousands of open-source projects and major technology companies.
- Professional Document Publishing: The format supports sophisticated document structures required for technical manuals, API reference documentation, and institutional reports, with automatic conversion to PDF, EPUB, and other professional publication formats for distribution and printing.
- Version Control Integration: As plain text files, .rst documents integrate seamlessly with Git and other distributed version control systems, allowing documentation to be versioned alongside source code, tracked for changes, reviewed, and managed through standard collaborative development workflows.
- Accessibility and Sustainability: Unlike proprietary formats, .rst files remain readable as plain text indefinitely, ensuring documentation survives software updates and format obsolescence while remaining accessible to any developer using basic text editors across all operating systems.
ReStructuredText continues to dominate in technical and academic documentation, particularly wherever Python is used or institutional knowledge must be preserved long-term. Its proven combination of readable plaintext syntax, powerful extensibility through directives and roles, and successful track record across major projects ensures its continued relevance for technical writers, software developers, and organizations managing complex documentation requirements and maintaining accessible, sustainable documentation systems for years to come.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- reStructuredText - DocutilsPublic Domain
- PEP 287 - reStructuredText Docstring FormatCC-BY-SA-3.0
- Sphinx DocumentationBSD-2-Clause
Missing an answer?
Suggest a question and we'll generate an answer for it.