HTML to reStructuredText Converter
Transform HTML into reStructuredText documentation format
HTML Input
reStructuredText Output
About HTML to reStructuredText Converter
Convert HTML documents to reStructuredText (RST) format, the markup language used by Sphinx, Docutils, and Python documentation. Perfect for technical documentation, API references, and software manuals.
Key Features
- Sphinx Compatible: Generates RST compatible with Sphinx documentation
- Table Support: Converts to both grid tables and simple tables
- Code Blocks: Preserves code with language-specific syntax highlighting
- Heading Hierarchy: Maps HTML headings to RST underline styles
- Inline Formatting: Maintains bold, italic, and code formatting
- Links & Images: Converts hyperlinks and images with proper RST syntax
- Directives: Uses RST directives for code blocks and images
How to Use
- Input HTML: Paste your HTML code or upload an .html file
- Configure Options: Choose table style and formatting options
- Review Output: The RST output updates automatically
- Copy or Download: Use the Copy or Download button to save your .rst file
Supported HTML Elements
- Headings: h1 (===), h2 (---), h3 (~~~), h4 (^^^), h5 ("""), h6 (''')
- Text Formatting: strong/b → **bold**, em/i → *italic*
- Code: code → ``inline``, pre → .. code-block::
- Lists: ul → * bullets, ol → numbered lists
- Links: a → `text <url>`_
- Images: img → .. image:: directive
- Tables: table → grid or simple table format
- Quotes: blockquote → indented text
- Definition Lists: dl/dt/dd → RST definition lists
Table Formats
Grid Tables: Full-featured tables with borders (default)
+--------+-------+ | Header | Value | +========+=======+ | Cell 1 | Data | +--------+-------+
Simple Tables: Lightweight tables without borders
======= ===== Header Value ======= ===== Cell 1 Data ======= =====
Common Use Cases
- Sphinx Documentation: Convert HTML docs to Sphinx RST format
- Python Documentation: Create Python package documentation
- Technical Writing: Write technical documentation in RST
- API Documentation: Generate API reference documentation
- ReadTheDocs: Prepare documentation for ReadTheDocs hosting
- Software Manuals: Create comprehensive software manuals
RST Directives
The converter uses standard RST directives:
- .. code-block:: For code blocks with syntax highlighting
- .. image:: For images with alt text and options
- .. error:: For error messages
Tips for Best Results
- Semantic HTML: Use proper HTML elements for accurate conversion
- Table Choice: Use grid tables for complex tables, simple for basic ones
- Code Blocks: Use <pre><code> with language classes
- Clean Structure: Well-structured HTML converts more accurately
- Review Output: Always review and adjust the RST output
Privacy & Security
All conversions happen locally in your browser. Your HTML is never uploaded to any server, ensuring complete privacy and security.
