JSON to Markdown Table Converter
Convert JSON to a markdown table and markdown tables to JSON. Flattens nested keys, handles arrays of objects and copies clean output. Free tool.
| id | name | role.title | role.level | skills | active | | --- | -------------- | ---------- | ---------- | ----------- | ------ | | 1 | Ada Lovelace | Engineer | 3 | math, logic | | | 2 | Grace Hopper | Admiral | 5 | COBOL | true | | 3 | Linus Torvalds | Maintainer | 4 | C, git | |
What Is a JSON to Table Converter?
A JSON to table converter takes structured data, usually an array of objects returned by an API or exported from a database, and lays it out as rows and columns so people can read it. This page produces a markdown table: object keys become the header, each object becomes a row, and nested values are flattened into dotted column names such as address.city.
The reverse mode, markdown to JSON, reads a pipe table and emits an array of objects keyed by the header cells, which is a quick way to turn a table in documentation into fixture data for tests or a config file. Both directions run in your browser.
How to Convert JSON to a Markdown Table
- Paste JSON into the left pane or open a .json file. The sample shows an array of objects with nested values.
- Fix any parse error reported in the output pane; the message names the line and column.
- Pick an alignment if you want every column left, centered or right aligned.
- Copy the json to markdown table output, or download it as table.md.
- To go the other way, switch to Markdown to JSON, paste a table and choose whether numbers and booleans should be parsed.
How Nested JSON Is Flattened
Markdown cells hold a single line of text, so structured values are reduced with these rules:
| JSON value | Column | Cell |
|---|---|---|
| {"name": "Ada"} | name | Ada |
| {"role": {"title": "Lead"}} | role.title | Lead |
| {"tags": ["a", "b"]} | tags | a, b |
| {"items": [{"id": 1}]} | items | {"id":1} |
| {"active": true, "score": null} | active, score | true, empty |
| {"a": {"b": {"c": 1}}} | a.b.c | 1 |
| {"x": {}} | x | empty |
Markdown to JSON
Markdown to JSON uses the header cells as property names. Blank headers become column1, column2 and so on, and duplicate headers get a numeric suffix so no data is overwritten. Choose an indent of 2 or 4 spaces for readable output, or Minified for the smallest payload. Alignment colons are ignored and any \| escape in a cell is turned back into a plain pipe. If your table came from the CSV converter, the round trip through json to markdown and back preserves every cell.
Fixing JSON Parse Errors
A JSON to table converter can only work on valid JSON, and most failures come from hand-edited text. Trailing commas, single-quoted strings, unquoted keys, comments and NaN are all rejected by JSON.parse. The error line reported in the output pane points at the first offending token; fix it and the table renders instantly. When the source is JavaScript rather than JSON, run it through JSON.stringify first or paste the response body from your browser's network panel, which is always valid.
Frequently Asked Questions
What JSON shapes can be converted to a table?
An array of objects is the normal case: each object becomes a row and each key a column. The json to table converter also accepts an object whose values are objects (the outer key becomes a key column), an array of numbers or strings (one value column) and a single object (one row).
How are nested objects handled?
Nested keys are flattened with dot notation, so { "user": { "name": "Ada" } } becomes a column called user.name. Arrays of scalars are joined with commas inside the cell, and arrays of objects are written as compact JSON so nothing is lost.
What if objects have different keys?
The column list is the union of every key, in the order they are first seen. Rows that lack a key get an empty cell. This keeps the table rectangular, which markdown requires.
Does markdown to JSON keep numbers as numbers?
With Parse numbers and booleans ticked, cells that look like 42, 3.14, -7, true, false or null become those JSON values; everything else stays a string. Untick it when you need every value quoted, for example IDs with leading zeros.
Why does the tool say my JSON is invalid?
The error shows the line and column of the first problem. The usual causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, or comments. Paste the output of JSON.stringify or a real API response and it will parse.