JSON to Markdown: the complete guide
The syntax, the alignment rules, the escaping rules, and the small mistakes that break a Markdown grid.
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/falseand 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.
Frequently asked questions
Everything you need to know about turning JSON into a Markdown table.
What is a JSON to Markdown table converter?
How do I create a Markdown table from JSON?
Is HopConvert free?
Does my JSON get uploaded?
How are special characters handled?
How is alignment decided?
What about nested JSON?
__, and arrays of objects expand into one row per element with the parent fields repeated.When should I use CSV instead?
Try the JSON to Markdown converter
Free, instant, and private — your JSON never leaves this tab.
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