JSON to reStructuredText Converter

Transform JSON data into reStructuredText tables, lists, and code blocks

JSON Input

reStructuredText Output

About JSON to reStructuredText Converter

Convert JSON data to reStructuredText (RST) format with support for tables, definition lists, literal blocks, and code blocks. Perfect for Sphinx documentation, Python documentation, and technical writing.

Key Features

  • Multiple Output Formats: Tables, definition lists, literal blocks, and code blocks
  • Table Styles: Simple, grid, list-table, and csv-table formats
  • Header Control: Optional header rows for tables
  • Column Alignment: Left, center, or right alignment for list/csv tables
  • Nested Support: Handles nested objects and arrays
  • Syntax Highlighting: Code blocks with JSON syntax highlighting
  • File Upload: Upload JSON files directly or paste data
  • Instant Preview: Real-time conversion as you type

How to Use

  1. Input JSON Data: Paste your JSON data or upload a .json file
  2. Configure Options: Select output format, table style, and alignment
  3. Review Output: The reStructuredText updates automatically
  4. Copy or Download: Use the Copy or Download button to save your .rst file
  5. Use in Documentation: Include in Sphinx, ReadTheDocs, or other RST projects

Example Conversion

JSON Input:

[
  {
    "name": "John Doe",
    "email": "john@example.com",
    "age": 28
  },
  {
    "name": "Jane Smith",
    "email": "jane@example.com",
    "age": 32
  }
]

reStructuredText Output (Grid Table):

+------------+-------------------+-----+
| name       | email             | age |
+============+===================+=====+
| John Doe   | john@example.com  | 28  |
+------------+-------------------+-----+
| Jane Smith | jane@example.com  | 32  |
+------------+-------------------+-----+

Output Format Options

  • Table: Convert JSON arrays to RST tables (simple, grid, list, or csv)
  • Definition List: Convert JSON objects to RST definition lists
  • Literal Block: Display JSON as indented literal block
  • Code Block: Display JSON with syntax highlighting and line numbers

Table Style Options

  • Simple: Lightweight table with = separators (best for simple data)
  • Grid: Full border table with + and - characters (most readable)
  • List Table: Directive-based table with bullet points (flexible)
  • CSV Table: Directive-based table with CSV-like syntax (compact)

Common Use Cases

  • Sphinx Documentation: Generate tables for Python documentation
  • ReadTheDocs: Create documentation from JSON API responses
  • Technical Writing: Convert data to readable documentation format
  • API Documentation: Document JSON API responses and schemas
  • Data Reports: Create formatted reports from JSON data
  • Configuration Docs: Document JSON configuration files

reStructuredText Features

  • Portable: Plain text format that renders beautifully
  • Sphinx Compatible: Works with Sphinx documentation generator
  • Version Control: Easy to track changes in Git
  • Multiple Outputs: Converts to HTML, PDF, LaTeX, and more
  • Extensible: Supports custom directives and roles

Best Practices

  • Choose Right Format: Use tables for tabular data, definition lists for key-value pairs
  • Grid Tables: Best for complex tables with many columns
  • Simple Tables: Best for simple data with few columns
  • List Tables: Best when you need more control over formatting
  • Code Blocks: Best for showing raw JSON with syntax highlighting
  • Consistent Style: Use the same table style throughout your documentation

Sphinx Integration

The generated reStructuredText can be directly used in Sphinx documentation:

# In your .rst file
API Response
============

.. include:: data.rst

Privacy & Security

All conversions happen locally in your browser. Your JSON data is never uploaded to any server, ensuring complete privacy and security.