Markdown to reStructuredText (RST) converter

Convert a README or doc from Markdown to RST for Sphinx, Read the Docs or PyPI.

Markdown to reStructuredText cheat sheet

MarkdownreStructuredText
# TitleTitle + ### over/underline
## SubSub + === underline
`code```code``
[text](url)`text <url>`__
1. item#. item
```py.. code-block:: py
table.. list-table::

RST specifics

RST headings are underlined, and the underline must be at least as long as the title; the converter sizes them for you. Links use anonymous references (__) so duplicate link text doesn’t cause “Duplicate explicit target name” warnings in Sphinx. Tables use the list-table directive, which is easier to edit than grid tables. Strikethrough has no RST equivalent and becomes plain text.

Sphinx can also read Markdown directly with the MyST parser extension, if you prefer to keep Markdown.

Other formats

Markdown converts to: Confluence, Jira, Slack, LaTeX, BBCode, MediaWiki, AsciiDoc, plus HTML, PDF, Word and Excel.

Questions people ask

Does PyPI support Markdown READMEs?
Yes. Set long_description_content_type="text/markdown". RST is only needed for Sphinx projects or older tooling.
Why “__” after links?
It makes the link anonymous, so the same text can link to different URLs without Sphinx warnings.

Related tools