How to Convert JSON to a Table: View, Sort & Export (CSV, Excel, Markdown)
Turn JSON into a readable table you can sort, filter, and export to CSV, Excel, HTML, or Markdown — online, in Python, and in JavaScript. Handle nested data the right way.
JSON is great for machines and painful to scan by eye. The fastest way to actually read a JSON array is to turn it into a table — rows and columns you can sort, filter, and drop into a spreadsheet or a doc. This guide shows how to convert JSON to a table cleanly, online and in code, with a plan for the nested data that usually makes it messy.
The quickest way: convert JSON to a table online
Copy a JSON array of objects, paste it into the JSON to table tool, and press Build table. Each object becomes a row, each key a column. From there you can click a header to sort, type to filter, and export.
Pick a tool that runs client-side (ours does) so your data is never uploaded — and, importantly, never turned into a public share link, which some “JSON viewer” sites do by default. Local processing also means there’s no file-size cap.
Use it when: you want to inspect or share a dataset quickly, on any device.
The right input shape
A table is a grid, so the JSON that maps cleanly is an array of objects with shared keys:
[
{ "id": 1, "name": "Ada", "team": "Core" },
{ "id": 2, "name": "Alan", "team": "Research" }
]
The keys of the objects become the columns; the union of all keys is used, so missing fields become empty cells. A single object becomes a one-row table.
Flatten nested data deliberately
Nesting is what turns a clean table into a mess of [object Object]. Two cases:
- Nested objects flatten into dot-notation columns —
{ "address": { "city": "London" } }becomes a columnaddress.city. - Nested arrays need a choice: expand to one row per item, join into a single cell, or keep the raw JSON in the cell. Expanding is best when you’ll group or pivot; joining is best for a quick readable summary.
A good tool lets you pick; doing it deliberately is the whole game.
Export to the format you need
A table is only useful if you can take it somewhere. Look for multiple export targets:
- CSV / Excel for spreadsheets and analysis.
- HTML to drop a
<table>straight into a web page. - Markdown for README files, GitHub issues, and docs.
Our tool exports all four, and exports respect the current sorted and filtered view — so you ship exactly what’s on screen.
Convert JSON to a table in Python
With pandas, a JSON array becomes a DataFrame — itself a table — in one line:
import pandas as pd
df = pd.read_json("data.json") # or pd.json_normalize(data) for nesting
print(df) # pretty table in the terminal
df.to_markdown("table.md", index=False)
df.to_csv("table.csv", index=False)
json_normalize flattens nested objects into dotted columns, mirroring what the online tool does.
Convert JSON to an HTML table in JavaScript
In the browser, build a table from an array of objects without a library:
function toTable(rows) {
const cols = [...new Set(rows.flatMap(Object.keys))];
const thead = `<tr>${cols.map((c) => `<th>${c}</th>`).join("")}</tr>`;
const tbody = rows
.map((r) => `<tr>${cols.map((c) => `<td>${r[c] ?? ""}</td>`).join("")}</tr>`)
.join("");
return `<table><thead>${thead}</thead><tbody>${tbody}</tbody></table>`;
}
Add sorting by re-rendering after rows.sort().
Which method should you use?
For a quick look, a sort, or a copy-paste export, use the online JSON to table tool — paste, sort, filter, export, done, with nothing uploaded. Use pandas when the table feeds analysis, and a small JavaScript helper when it lives in a web page. Whatever you choose, decide up front how nested data flattens, and the table will be clean.
Need a specific output? See how to convert JSON to CSV and JSON to Excel. New to the format? Read what is JSON.
Ready to merge your JSON?
Combine files or snippets in your browser — free and private.
Open the merge toolKeep reading