The complete guide

JSON to Markdown: the complete guide

The syntax, the alignment rules, the escaping rules, and the small mistakes that break a Markdown grid.

Try the JSON to Markdown Converter

What does a Markdown table look like?

A GitHub-flavoured Markdown table is three kinds of line: a header row, a separator row, and one body row per record. Every cell is wrapped in pipes, and every row has the same number of cells.

| id | name       | active |
| --- | ---------- | ------ |
| 1  | Alice Chen | true   |
| 2  | Bob Singh  | false  |

The separator row is not decoration — it is required, and it is what tells the renderer where the header ends. Each of its cells must contain at least three hyphens. A table without a separator row is not a table; it renders as plain text.

How does column alignment work?

The separator row also controls alignment. The hyphens can be padded with a colon on either side:

  • | --- | — default, left-aligned
  • | :--- | — left-aligned, explicitly
  • | :---: | — centred
  • | ---: | — right-aligned

Padding the dashes to match the width of the header cell is purely cosmetic, but it makes the raw Markdown far easier to read in a diff. Most people right-align numeric columns because that is what a spreadsheet would do, and HopConvert detects it automatically — a column whose every value is a number gets ---:.

How do you escape special characters?

Two characters will break a Markdown table if they are not handled:

  • The pipe character | is the column separator. A cell containing a raw pipe is split into two columns, and the row becomes ragged. Escape it as \|.
  • The newline ends the row. A cell containing a line break must have it replaced with a space, or the table stops early and the rest of your data becomes stray text.

Backslashes need care too: escaping a pipe introduces a backslash, so a literal backslash in your data has to be doubled first. HopConvert escapes in that order — backslashes, then pipes — which is the only order that is actually correct.

value "a | b"   becomes   value "a \| b"
value "C:\dir"  becomes   value "C:\\dir"

How is the column set decided?

The converter reads every record and builds the column list from the union of all keys, in order of first appearance. Records missing a key simply get an empty cell. Without this, a JSON array where the first record has three keys and the second has four would produce a broken table with mismatched row lengths — which most renderers either drop or silently repair.

How is nested data handled?

Nested objects are flattened into column names joined by __ — {"user": {"name": "Alice"}} produces the column user__name. Arrays of objects expand into one row per element with the parent fields repeated, which is the layout a documentation table almost always wants.

Because a Markdown table must stay flat, there is no way to represent genuinely nested content. For anything that needs structure, CSV or Excel is the better target.

Common edge cases

  • A value containing a pipe: escaped to \|.
  • A value containing a newline: replaced with a space.
  • Empty values: rendered as an empty cell, not the string "null".
  • Boolean and numeric values: written as true / false and bare numbers, and numeric columns are right-aligned.
  • Very long values: optionally truncated with an ellipsis using the cell-length setting.
  • A single object instead of an array: converted to a one-row table.
  • An array of scalars: converted to a single column named value.
  • Unicode and emoji: written as UTF-8, which every modern renderer handles.

Where do Markdown tables belong?

Markdown tables are a documentation format, not a data format. They are the right choice for:

  • READMEs and documentation sites — feature matrices, parameter tables, version comparisons, supported options.
  • Issue and pull request bodies — where a reviewer needs to see actual rows.
  • Changelogs and release notes — a table of changes per version.
  • Slack, Discord, and email — a short table pasted into a channel, where a screenshot would be worse.

They are the wrong choice for anything that needs to be sorted, filtered, pivoted, or joined. That is a spreadsheet job — use JSON to Excel or JSON to CSV instead. And if the data is sensitive enough that it should never leave your machine, every HopConvert tool keeps it in the browser.

FAQ

Frequently asked questions

Everything you need to know about turning JSON into a Markdown table.

What is a JSON to Markdown table converter?
A JSON to Markdown table converter transforms a JSON array of records into a GitHub-flavoured Markdown table — a header row, an alignment separator, and one row per record. The result pastes directly into a README, issue, pull request, wiki, or chat message.
How do I create a Markdown table from JSON?
Paste your JSON into the converter and the table appears immediately. Download the .md file, or select the preview text and paste it into your editor. Column alignment and pipe escaping are handled for you.
Is HopConvert free?
Yes — 100% free, no sign-up, no watermark, no premium tier. Everything runs in the browser, so there are no server costs to pass on.
Does my JSON get uploaded?
No. The table is generated locally in your browser with JavaScript. There is no backend that could receive your data, and the "Verify: nothing uploaded" button shows a live audit of every network request the page makes.
How are special characters handled?
A pipe inside a value is escaped to a literal pipe so it cannot split the row; newlines inside a value are replaced with spaces so they cannot end the table; and backslashes are escaped first so the pipe escaping stays correct.
How is alignment decided?
Automatically by default — numeric columns are right-aligned and everything else is left-aligned. You can force left, centre, or right alignment for all columns in settings.
What about nested JSON?
Nested objects are flattened into column names joined by __, and arrays of objects expand into one row per element with the parent fields repeated.
When should I use CSV instead?
When the data needs to be sorted, filtered, pivoted, or joined — that is spreadsheet work. Markdown tables are a documentation format. For analysis use JSON to CSV; for a typed, formatted workbook use JSON to Excel.

Try the JSON to Markdown converter

Free, instant, and private — your JSON never leaves this tab.

Open the JSON to Markdown Converter

More free tools: JSON to CSV · CSV to JSON · XML to CSV · JSON to YAML · YAML to JSON · JSONL to CSV · JSON to SQL · JSON to Markdown · JSON to Excel