Practical guide

Convert JSON to a Markdown table

A Markdown table is the right export when the reader needs a small, reviewable table inside a README, issue, pull request, or internal note. It is not a general JSON-to-document generator.

Start from the rows and columns that belong in the document. Wide JSON objects often need a JQ projection first so the final table is readable.

Pick documentation columns

The goal is not to expose every JSON field. A good documentation table shows the few fields a person will compare. If the source has deeply nested diagnostics, links, or long notes, project the useful fields first and leave the full JSON available separately.

Markdown table export requires a root array or shaped array result. Nested object members can become path columns such as metrics.score.

Release-readiness workflow that exports 80 review rows, inspects the raw Markdown for escaped pipes and break tokens, and verifies the same difficult row in a documentation renderer.

Pipe and newline handling

This example starts from a root object and selects .report.rows before export. Markdown uses | as a column separator, so a pipe inside a value must be escaped. Multiline strings are converted into visible break tokens in the table cell. Preview the table in the Markdown renderer your readers will use, because renderers can disagree on small details.

Source JSON with root wrapperjson
{
  "report": {
    "rows": [
      {"name":"left|right","note":"hello\nworld"},
      {"name":"plain","note":"ok"}
    ]
  }
}
JQ query for the table rowsjq
.report.rows
Shaped array to exportjson
[
  {"name":"left|right","note":"hello\nworld"},
  {"name":"plain","note":"ok"}
]
Markdown table outputmarkdown
| name | note |
| --- | --- |
| left\|right | hello<br/>world |
| plain | ok |

Export for a README or issue

  1. Open the JSON source locally.
  2. Use a query if the document needs fewer columns than the source contains.
  3. Choose Export, then Markdown table.
  4. Paste the generated table into the README, issue, or documentation page.
  5. Preview the rendered Markdown in the same platform where readers will see it.
JSON values with a pipe and newline become escaped Markdown source and remain inside their intended rendered table cells.
Two-row transformation proof showing how a literal owner pipe and a multiline verification note travel from JSON through Markdown source into one rendered table cell each.

Preview the exact Markdown dialect

GitHub, documentation generators, chat tools, and internal wikis do not all render Markdown tables identically. The raw table can be valid text while still wrapping poorly on mobile or displaying multiline content in a way that surprises readers.

If a row has long arrays, nested objects, or multiline notes, compare a raw text preview with the rendered result. Sometimes the better answer is HTML table export or a downloadable CSV file.

A good Markdown table is intentionally small. If you would need horizontal scrolling, footnotes in every cell, or manual editing after every export, the table is probably carrying too much JSON structure for documentation.

Markdown escaping is not a security review

Escaping a pipe keeps a table cell from splitting. Replacing a newline with a visible break token keeps a row readable. Those are formatting transformations, not a guarantee that arbitrary markup-like text is safe in every renderer.

For externally sourced data, review the destination platform's sanitization rules. Keep the generated table small enough that a human can check the important cells.

When the table is part of a release note or incident report, add a one-sentence source note near it: which JSON file or query produced the rows, and whether the output was edited after export. That keeps the documentation useful after the original context is gone.