JSON to Markdown table

Input
Output

JSON to Markdown Table

Turn an array of objects into a Markdown table you can paste into a GitHub issue, a README, docs or a wiki.

Example: a product list for a README

An array of products, with a nested stock object and a | inside one name. The nested keys become their own columns, numbers are right-aligned, and the | is escaped so it doesn't split the cell:

Input

[
  {
    "sku": "KB-01",
    "name": "Keyboard",
    "price": 2499,
    "stock": {
      "pune": 12,
      "delhi": 0
    }
  },
  {
    "sku": "MS-02",
    "name": "Mouse | wireless",
    "price": 799,
    "stock": {
      "pune": 40,
      "delhi": 7
    }
  }
]

Output

| sku   | name              | price | stock.pune | stock.delhi |
| ----- | ----------------- | ----: | ---------: | ----------: |
| KB-01 | Keyboard          |  2499 |         12 |           0 |
| MS-02 | Mouse \| wireless |   799 |         40 |           7 |

How do I use the JSON to Markdown table?

  1. Paste an array of objects.
  2. Pick which array to use if there are several.
  3. Copy the Markdown table.

What does the JSON to Markdown table do?

  • Nested keys become dotted columns
  • Numbers right-aligned
  • Switch Format for an HTML table

When to use the JSON to Markdown table

Markdown tables are the easiest way to put data into a GitHub issue or pull request, a README, a wiki page or a chat message, but writing one by hand from JSON means lining up every pipe. Paste the array instead and copy a finished table: column widths are padded so the Markdown is readable as text too, and numbers are right-aligned.

Nested objects become dotted columns such as stock.pune, and arrays inside a record become numbered columns such as tags.0 and tags.1. A | inside a value is escaped as \| so it doesn't split the cell. If the records sit inside a response, Bracely uses the first array it finds; type a path such as data.users in Array to pick another one, and a single object becomes a one-row table.

Frequently asked questions

Why does a column show tags.0 and tags.1?
Markdown cells can't hold lists, so each item of an array gets its own column. Join the list into one string first (List tools or jq) if you'd rather have one column.
Will the table render on GitHub?
Yes. It's GitHub Flavored Markdown: a header row, a separator row with alignment colons, and one row per record. GitLab, Notion, Obsidian and most wikis read the same format.
Can I get an HTML table?
Yes. Change Format to HTML table.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has 108 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.7 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram