JSON to Markdown Converter

Paste JSON or upload a .json file. Arrays of flat objects become tables; nested objects become headings and lists.

Input — JSON
Output — Markdown
Markdown output will appear here...

To convert JSON to Markdown, paste the JSON (or upload a .json file) into the box above and copy the Markdown on the right. Arrays of flat objects become tables with one column per key. Objects become ## headings, plain values become - **key**: value lines, and arrays of strings or numbers become bullet lists.

What does the output look like?

An array of flat objects becomes a table

JSON in
[
  { "id": 1, "name": "Ana", "active": true },
  { "id": 2, "name": "Li", "active": false, "team": "ops" }
]
Markdown out
| id | name | active | team |
| --- | --- | --- | --- |
| 1 | Ana | true |  |
| 2 | Li | false | ops |

A nested object becomes headings and a list

JSON in
{
  "service": "billing",
  "owner": { "name": "Dana", "slack": "#billing" },
  "regions": ["eu-west-1", "us-east-1"]
}
Markdown out
- **service**: billing
## owner

- **name**: Dana
- **slack**: #billing
## regions

- eu-west-1
- us-east-1

One nested value turns the table into sections

JSON in
{
  "users": [
    { "name": "Ana", "tags": ["admin", "ops"] },
    { "name": "Li", "tags": [] }
  ]
}
Markdown out
## users

- **name**: Ana
### tags

- admin
- ops
- **name**: Li
### tags

Because each user has a tags array, the users are written one after another as lists instead of a table.

When does a JSON array become a Markdown table?

Only when every item is an object and every value in those objects is a string, number, boolean or null. The columns are every key seen across all items, in the order they first appear. An item that lacks a key gets an empty cell, as with team in the first example.

If any item holds a nested object or array, the whole array is written as lists instead. To get a table anyway, flatten the data first, or paste the rows as CSV into CSV to Markdown.

How are nested objects converted?

Each key that holds an object or array becomes a heading, starting at ## for the top level and going one level deeper per step. Headings stop at ######, the deepest Markdown allows, so anything nested more than five levels down shares that level.

What if my JSON is invalid?

The converter uses the browser's strict JSON parser, so trailing commas, single quotes, comments and unquoted keys all fail. The parser's error message is shown beside the output and nothing is converted until the input parses. JavaScript object literals copied from code usually need those fixes.

Can I convert JSON to Markdown on the command line?

Pandoc will not do it: pandoc -f json reads Pandoc's own document format, not arbitrary JSON. The usual tool is jq, where you write the table yourself:

jq -r '.[] | "| \(.id) | \(.name) |"' users.json

That is the right approach for a script or many files. For a one-off payload, pasting it here is faster. If the data is YAML rather than JSON, use YAML to Markdown.

How are nulls, big numbers, pipes and other edge cases handled?

InputWhat you get
Pipe | in a table valueEscaped as \|
Pipe | in a key used as a column nameNot escaped, so the header gets an extra column. Rename the key
Line break (\n) in a table valueWritten as a real line break, which splits the table row
null, or missing key, in a tableEmpty cell
null as an object valueA heading with the key and nothing under it
Empty object {} or array []A heading with nothing under it
true / false / numbersWritten as text: true, false, 42
Integers above 9007199254740991Rounded by JavaScript: 12345678901234567890 becomes 12345678901234567000. Quote big IDs as strings
Array of arrays [[1,2],[3,4]]Flattened into one bullet list: 1, 2, 3, 4
A bare string or numberOutput as that value on its own
Accents, CJK and emojiPassed through unchanged
Wide arrays of objectsOne column per distinct key, however many there are

How does this compare with jq and Pandoc?

MDConvert (this page)jqPandoc
Reads any JSONYesYesNo, -f json means Pandoc's own AST
Builds tables for youYes, for arrays of flat objectsNo, you write the row templateNot applicable
Install neededNo, runs in the browserYes, command-line programYes, command-line program
Batch / scriptingNo, one document at a timeYesYes
Your data leaves your machineNoNoNo

jq gives full control over the output and is the better choice inside a pipeline. This page is for getting readable Markdown from a payload without writing a filter.

Maintained by Ankit Aglawe. Last updated .

Related Tools

Need a different format? See every tool on the Markdown converter page, or go back to the MDConvert home page.

JSON to Markdown questions

Can I upload a .json file?
Yes. Click Upload above and choose the file, or paste its contents into the input box. The Markdown updates as soon as the JSON is valid.
Does it keep the order of my keys?
Mostly. Keys come out in the order they appear in the file, with one exception from JavaScript itself: keys that look like whole numbers, such as "2" or "10", are moved to the front in numeric order.
Does it work with JSON Lines (NDJSON)?
Not directly. A .jsonl file has one object per line, which is not a single JSON value, so it fails to parse. Wrap the lines in [ ] and put a comma at the end of each line except the last.
Why is there no title at the top?
Top-level keys become ## headings and the converter does not invent a # title. Add one line such as # Billing service above the output before you publish it.
Are Markdown characters in my values escaped?
No. A value such as *beta* or _draft_ is written as-is, so it renders as italic text. Only pipe characters inside table cells are escaped.
Is the JSON sent to a server?
No. Parsing and conversion run in your browser, so API keys or customer records in the payload stay on your machine. Still, remove secrets before you publish the Markdown.