Step 1: Add JSON
Paste JSON into the editor, choose Open JSON File, or choose Load Sample JSON. Open JSON File converts as soon as a valid file is read. Load Sample JSON converts immediately.
Paste a JSON array and convert JSON to an HTML table in your browser. The text stays on this page and is not uploaded.
Convert JSON to see HTML table markup here.
Convert JSON to see a rendered table here.
Paste a JSON array of objects and convert it to an HTML table. Headers are the union of all keys in first-seen order. Missing keys leave an empty cell. For this input:
[
{"name": "Ayesha", "age": 28, "city": "Karachi"},
{"name": "Bilal", "age": 34, "city": "Lahore", "plan": "Pro"}
]
the markup (2-space indent, thead and tbody on) is:
<table>
<thead>
<tr>
<th scope="col">name</th>
<th scope="col">age</th>
<th scope="col">city</th>
<th scope="col">plan</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ayesha</td>
<td>28</td>
<td>Karachi</td>
<td></td>
</tr>
<tr>
<td>Bilal</td>
<td>34</td>
<td>Lahore</td>
<td>Pro</td>
</tr>
</tbody>
</table>
It turns a JSON array of objects into HTML table markup for a web page, an email, or a report. Conversion runs in this browser with JSON.parse. The JSON is not uploaded.
Use it when you have API data, a spreadsheet export as JSON, or a list of records and you need a table you can paste into HTML. Format the JSON first in the JSON Formatter or inspect it in the JSON Viewer if you need to read the structure before converting.
This page converts JSON to HTML tables only. It does not write Markdown or CSV. For a spreadsheet file, use the JSON to CSV converter. For XML instead of a table, use the JSON to XML converter.
Paste JSON into the editor, choose Open JSON File, or choose Load Sample JSON. Open JSON File converts as soon as a valid file is read. Load Sample JSON converts immediately.
Keep flatten nested keys on for dotted columns such as address.city. Keep thead and tbody on unless you need a bare table. Add an optional caption or CSS class, and pick 2-space or 4-space indentation.
Pasted JSON needs Convert to HTML. Invalid JSON stays in the editor. The status line explains the problem in plain language, and the table preview is cleared.
Copy HTML converts the current editor text, then copies that markup. Download HTML converts the current editor text and saves table.html. Neither button copies a stale preview. Clear empties both panels.
An array of objects becomes one row per object. The headers are the
union of all keys, in first-seen order. Each key becomes a
<th scope="col"> header.
With flatten nested keys on (the default), nested objects become dotted
columns. {"user": {"name": "Ayesha", "address": {"city": "Karachi"}}}
becomes the columns user.name and user.address.city.
Arrays of plain values are joined with semicolons in one cell. Arrays of objects are shown as compact JSON in one cell.
If one object has a key that another object does not, the column still appears. The missing cell is empty.
A JSON object that is not wrapped in an array is treated as a one-row table. A root that is neither an array nor an object fails with a plain-language error before any markup is produced.
Every key and value is HTML-escaped. &, <,
>, quotes and apostrophes become entities, so markup
inside the data shows as text and cannot run. A value like
<img onerror=…> appears as text in the cell; it is
not inserted as live HTML.
On by default. Nested objects become dotted columns such as
address.city. Turn it off to keep a nested object as compact
JSON in one cell.
On by default. The header row is wrapped in <thead>
and the data rows in <tbody>. Turn it off for a table
with only <tr> rows.
Optional. When filled, the converter adds a <caption>
as the first child of the table.
Optional. Adds a class to the <table> so you can hook
Bootstrap, Tailwind, or your own stylesheet.
2 spaces (default) or 4 spaces in the generated markup.
Input:
[
{"name": "Ayesha", "age": 28, "city": "Karachi"},
{"name": "Bilal", "age": 34, "city": "Lahore", "plan": "Pro"}
]
Output with 2-space indentation, thead and tbody on, and no caption or class:
<table>
<thead>
<tr>
<th scope="col">name</th>
<th scope="col">age</th>
<th scope="col">city</th>
<th scope="col">plan</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ayesha</td>
<td>28</td>
<td>Karachi</td>
<td></td>
</tr>
<tr>
<td>Bilal</td>
<td>34</td>
<td>Lahore</td>
<td>Pro</td>
</tr>
</tbody>
</table>
Headers are the union of all keys in first-seen order: name, age, city,
plan. The first record has no plan, so its cell is empty. Flattening
example: {"user": {"name": "Ayesha", "address": {"city": "Karachi"}}}
becomes the columns user.name and user.address.city.
Paste a JSON array of objects. The converter writes a table with one row per object and one column per key. Copy the markup into your page.
The converter treats one object as a one-row table — you do not need to wrap it in square brackets yourself.
They are flattened into dotted columns. {"address": {"city": "Karachi"}} becomes the column address.city.
The cell stays empty. The column still appears, because the headers are the union of all keys across every object.
Yes. &, <, >, quotes and apostrophes are escaped, so markup inside your data shows as text and cannot run.
Yes. Add a CSS class (for example for Bootstrap or Tailwind) and a caption; the markup is plain and ready to style with your own CSS.
No. The conversion runs entirely in your browser with JavaScript — your JSON is never sent to a server, logged or stored.
The converter tells you in plain language (e.g. a missing comma or an unquoted key) and produces no table until the JSON parses. Fix the input, then convert again.
Free tool, runs entirely in your browser. Nothing you paste is uploaded or stored.