Output will appear here
Output will appear here
Paste a JSON array of objects and get an HTML <table> with a <thead> of column names and one <tr> per object. Every key and value is HTML-escaped, so <script> in your data shows up as text instead of running. Inline styles give borders and padding, so the table looks right when pasted into an email or CMS.
By Ankit Aglawe · Updated · Runs entirely in your browser
team exists only on the third user, so it becomes a column with empty cells above it. lastLogin: null is printed as the text null, while the missing lastLogin on Sam is an empty cell. The apostrophe in O'Neil is escaped as '.
[
{ "id": 1, "name": "Ana Costa", "role": "admin", "lastLogin": "2024-03-02T08:14:00Z" },
{ "id": 2, "name": "Li Wei", "role": "viewer", "lastLogin": null },
{ "id": 3, "name": "Sam O'Neil", "role": "editor", "team": "Growth" }
]<table style="border-collapse: collapse; width: 100%;">
<thead>
<tr>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">id</th>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">name</th>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">role</th>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">lastLogin</th>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">team</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">1</td>
<td style="border: 1px solid #ddd; padding: 8px;">Ana Costa</td>
<td style="border: 1px solid #ddd; padding: 8px;">admin</td>
<td style="border: 1px solid #ddd; padding: 8px;">2024-03-02T08:14:00Z</td>
<td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">2</td>
<td style="border: 1px solid #ddd; padding: 8px;">Li Wei</td>
<td style="border: 1px solid #ddd; padding: 8px;">viewer</td>
<td style="border: 1px solid #ddd; padding: 8px;">null</td>
<td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">3</td>
<td style="border: 1px solid #ddd; padding: 8px;">Sam O'Neil</td>
<td style="border: 1px solid #ddd; padding: 8px;">editor</td>
<td style="border: 1px solid #ddd; padding: 8px;"></td>
<td style="border: 1px solid #ddd; padding: 8px;">Growth</td>
</tr>
</tbody>
</table>A single object becomes a Key / Value table. The <timeout> and & in lastError are escaped, so the browser shows them literally. regions and db are written as JSON text in one cell.
{
"service": "checkout-api",
"healthy": true,
"lastError": "<timeout> after 30s & retry",
"regions": ["eu-west-1", "us-east-1"],
"db": { "primary": "up", "replica": "lagging" }
}<table style="border-collapse: collapse; width: 100%;">
<thead>
<tr>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">Key</th>
<th style="border: 1px solid #ddd; padding: 8px; text-align: left;">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">service</td>
<td style="border: 1px solid #ddd; padding: 8px;">checkout-api</td>
</tr>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">healthy</td>
<td style="border: 1px solid #ddd; padding: 8px;">true</td>
</tr>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">lastError</td>
<td style="border: 1px solid #ddd; padding: 8px;"><timeout> after 30s & retry</td>
</tr>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">regions</td>
<td style="border: 1px solid #ddd; padding: 8px;">["eu-west-1","us-east-1"]</td>
</tr>
<tr>
<td style="border: 1px solid #ddd; padding: 8px;">db</td>
<td style="border: 1px solid #ddd; padding: 8px;">{"primary":"up","replica":"lagging"}</td>
</tr>
</tbody>
</table>Keys and values are escaped for &, <, >, " and ', so <script>alert(1)</script> in a value becomes <script>... and renders as text. Values are never put in href or src, so a javascript: string is only text.
A nested value is written as minified JSON, also escaped, inside its cell. The tool does not build nested tables.
A null value prints the word null. A key that is missing from an object gives an empty <td>. You can tell the two apart in the output.
The header is the union of keys from all objects, in first-seen order. Every row gets one <td> per column, so the table never has ragged rows.
A \n inside a value is kept as-is in the HTML, which browsers display as a space. Use CSS white-space: pre-line on the cells if you want the line breaks shown.
Each <table>, <th> and <td> has a style attribute with a 1px #ddd border and 8px padding. That survives email clients that strip <style> blocks. Delete the attributes if you style the table with your own CSS.
| JSON input | HTML output |
|---|---|
| Array of objects | <thead> of keys, one <tr> per object |
| Single object | Two columns: Key, Value |
| Array of plain values | One Value column |
| Nested object or array | Escaped JSON text in the <td> |
null | null as text |
| Missing key | Empty <td> |
[] / {} | One cell: Empty array / Empty object |
Enter a JSON array of objects into the input editor. Each object represents a table row and its keys define the column headers for the HTML table.
The output shows a complete HTML <table> element with <thead> and <tbody> sections. Inline CSS styling provides borders, padding, and alternating row colors for immediate readability.
Copy the HTML output and paste it into any webpage, email template, or CMS. The table is self-contained with inline styles so it renders consistently without external CSS dependencies.
Paste a JSON array of objects in the left pane. Copy the generated <table> markup, or download it as an .html file.
Yes for the data itself: every key and value is HTML-escaped, so markup in the JSON is shown as text and cannot inject scripts.
Yes. Remove the inline style attributes, or override them with a more specific selector or !important.
Yes. The styles are inline, which is what most email clients need, and the markup is a plain table with thead and tbody.
As compact JSON text inside the cell. Flatten the data first, for example with the JSON to CSV tool, if you need separate columns.
No. The HTML is generated in your browser.
Need several formats at once? Convert All shows every output from one paste. Or browse all JSON converters.