.RST

RST File

reStructuredText Document
Ask a question
QUICK ANSWER

An RST file is a reStructuredText document - plain text with lightweight markup used mainly for Python and software documentation. Open and edit it in any text editor; VS Code with the reStructuredText extension gives syntax highlighting and a live preview. To render it as HTML or PDF, run Docutils (rst2html) or Sphinx.

Developer: David Goodger / Python Doc-SIG (Docutils project) Category: Text Files Open standard MIME: text/x-rst
OPENS ON Windows macOS Linux Web
Related: .DOC · .ODT · .DOCX · .GDOC

On this page

19k+ extensions indexed
Last reviewed Jul 17, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

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: LOW

RST 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
FULL NAMEreStructuredText Documentaka ReST, reST
DEVELOPERDavid Goodger / Python Doc-SIG (Docutils project)since 2002 (David Goodger, first release April 2, 2002)
CATEGORYText Files
MIME TYPEtext/x-rst
TYPEplain-text lightweight markup document
STANDARDOpen · royalty-free
This extension is also used by…
  • 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

Windows5 apps
Windows Notepad Built-in Opens the raw RST text for quick reading and editing - no syntax highlighting or preview.
Notepad Open-source Open the .rst - Notepad++ has community UDL (user-defined language) for RST syntax highlighting. Lightweight editing without preview.
Visual Studio Code Free Install the 'reStructuredText' extension (lextudio.restructuredtext) for syntax highlighting and a live HTML preview via the RST preview pane.
Sphinx (sphinx-build) Open-source Run 'sphinx-build -b html docs/ _build/html' to render .rst files to a full HTML documentation site. Install via pip install sphinx.
Docutils (rst2html) Open-source Run 'rst2html file.rst file.html' to convert a single .rst to HTML. Install via pip install docutils.
macOS3 apps
TextEdit Built-in Open the .rst as plain text (use Format > Make Plain Text to prevent RTF conversion). No preview.
Visual Studio Code Free Install the reStructuredText extension for syntax highlighting and live HTML preview.
Sphinx (sphinx-build) Open-source pip install sphinx, then sphinx-build to convert RST documentation to HTML/PDF.
Linux3 apps
Visual Studio Code Free Install the RST extension for syntax highlighting and preview.
gVim / Vim Open-source Vim includes RST syntax highlighting; rst.vim plugin adds folding and preview.
Sphinx (sphinx-build) Open-source pip install sphinx or install via distro (python3-sphinx); run sphinx-build or rst2html.
Web1 app
Read the Docs Free Host a Sphinx/RST project on readthedocs.org to render and publish it as a searchable HTML documentation site.

Technical details

deep spec
EncodingPlain text, UTF-8 (ASCII-compatible; Windows files may carry a UTF-8 BOM)
Section headingsUnderline (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 processorDocutils (rst2html, rst2latex, rst2pdf, rst2xml)
Sphinx extensionsSphinx adds :ref:, :doc:, autodoc, and other project-specific directives on top of core RST
MIME typetext/x-rst (de facto); text/prs.fallenstein.rst (IANA-registered, rarely used)
Signature / magic bytesNone - plain text file with no binary header
Primary ecosystemPython documentation (official Python docs, NumPy, Django, Linux kernel docs, Read the Docs)
Typical size1 KB - 500 KB per source file; large Sphinx projects may contain hundreds of .rst files
Released2002 (David Goodger, first release April 2, 2002)
Latest versionDocutils 0.21 (2024); no separate RST format version number
Open standardYes · royalty-free
Specificationdocutils.sourceforge.io

RST conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with RST files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about RST files.

Frequently asked questions

What is an RST file?
An RST file is a reStructuredText document - plain text with lightweight markup used primarily for Python and software documentation. It's processed by Sphinx or Docutils to produce HTML, PDF, or ePub output.
How do I open an RST file?
Any text editor opens the raw RST text. For a formatted view, use VS Code with the reStructuredText extension (live HTML preview), or run 'rst2html file.rst file.html' in a terminal (needs pip install docutils).
How do I convert RST to HTML or PDF?
For a single file: install Docutils (pip install docutils) and run 'rst2html file.rst file.html', or use Pandoc. For a full documentation site, Sphinx builds HTML and PDF from multiple RST files. The free rst2pdf tool converts RST directly to PDF without LaTeX.
What is the difference between RST and Markdown?
Both are plain-text markup, but RST is more powerful for structured documentation: it has directives (.. code-block::, .. toctree::) and roles (:ref:, :func:) for rich cross-references. Markdown is simpler and more widely used for general text (READMEs, notes). Sphinx uses RST natively and can also use Markdown (via MyST).
Why is there an RST file in the Python package I downloaded?
README.rst is the traditional package readme for Python packages published to PyPI - it's displayed on the PyPI package page. Modern packages increasingly use README.md instead, but RST is still common in older and scientific Python packages.
Can I open an RST file on my phone?
Any plain-text app opens the raw markup. For rendered output, use a browser to view the online documentation (e.g., on Read the Docs) built from those RST files.

References

1Wikipedia - reStructuredTexten.wikipedia.org
2reStructuredText Markup Specification (Docutils)docutils.sourceforge.io

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.BINCD/DVD Disc Image (BIN/CUE)
4.PARTPartial Download File
5.MDMarkdown Document
6.RPMSGRestricted Permission Message
7.NOMEDIAAndroid No-Media Marker File
8.PRO6XProPresenter 6 Bundle File
9.PRDXSoftMaker Presentations Document
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.DOCMicrosoft Word 97-2003 Document
.ODTOpenDocument Text
.DOCXMicrosoft Word Open XML Document
.GDOCGoogle Docs Shortcut (Link to a Google Docs document)
.LSTList File (generic plain-text list / listing)
.VNTvNote (mobile phone text note / memo)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z