What is the RST file format?
.rst is a plain-text lightweight markup format used primarily for technical documentation in the Python ecosystem. Files use human-readable syntax: section headings are created by underlining title text with characters such as =, -, or ~; code samples are introduced with .. code-block:: directives; cross-references use :role: syntax; and document tables of contents are built with .. toctree:: directives.
Compared to Markdown, .rst provides a formal directive and role system that enables richer semantic markup - footnotes, citations, custom admonitions, API cross-references - without requiring separate extensions. The Sphinx documentation generator uses .rst as its native source format and produces the official Python, NumPy, Django, and Linux kernel documentation from .rst source files.
Files are UTF-8 plain text with no binary structure or magic bytes, editable in any text editor. The standard processor is Docutils, which converts .rst to HTML, LaTeX, PDF, and other outputs through command-line tools such as rst2html and rst2latex. Large Sphinx projects link hundreds of individual .rst source files through .. toctree:: directives.
The MIME type in common use is text/x-rst; the only IANA-registered type, text/prs.fallenstein.rst, is not acknowledged by the Docutils project itself. reStructuredText is actively maintained, though newer projects increasingly adopt Markdown-based alternatives such as MyST for lighter documentation workflows.
Security & safety
RISK: LOWRST files are plain text and cannot execute code on their own, so opening one is safe. The only caution: Sphinx directives can include raw HTML (.. raw:: html) that renders in a browser - rendered output from an untrusted RST source could contain active HTML/JS. Stick to reading the raw source or a sandboxed renderer if the provenance is unknown.
Format details
in a nutshell- IBM VoiceType Script File - Legacy IBM VoiceType speech-recognition script (1990s IBM product); effectively extinct.
- Abaqus Results File - Abaqus FEA simulation binary restart/results file, unrelated to text markup (binary format with .rst extension).
Programs that open RST files
Technical details
deep spec| Encoding | Plain text, UTF-8 (ASCII-compatible; Windows files may carry a UTF-8 BOM) |
| Section headings | Underline (and optionally overline) title text with =, -, ~, ^, or other punctuation characters |
| Directives | .. directive-name:: syntax for code blocks, images, notes, toctrees, and custom extensions |
| Inline roles | `:role:` syntax for semantic cross-references, abbreviations, and math |
| Table of contents | .. toctree:: directive (Sphinx) links multiple .rst files into a navigable document tree |
| Standard processor | Docutils (rst2html, rst2latex, rst2pdf, rst2xml) |
| Sphinx extensions | Sphinx adds :ref:, :doc:, autodoc, and other project-specific directives on top of core RST |
| MIME type | text/x-rst (de facto); text/prs.fallenstein.rst (IANA-registered, rarely used) |
| Signature / magic bytes | None - plain text file with no binary header |
| Primary ecosystem | Python documentation (official Python docs, NumPy, Django, Linux kernel docs, Read the Docs) |
| Typical size | 1 KB - 500 KB per source file; large Sphinx projects may contain hundreds of .rst files |
| Released | 2002 (David Goodger, first release April 2, 2002) |
| Latest version | Docutils 0.21 (2024); no separate RST format version number |
| Open standard | Yes · royalty-free |
| Specification | docutils.sourceforge.io |
RST conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about RST files.