HTML Table to JSON extracts data from an HTML <table> element and converts it into a JSON array of objects. Column headers become object keys, and each table row becomes an object.
The tool uses the browser's built-in DOMParser to parse the HTML, then extracts headers from <thead> (or the first row if no thead exists) and data from <tbody> rows. It handles both <th> and <td> cells.
This is useful for extracting data from web pages, converting HTML reports to JSON, or quickly getting structured data from table-based HTML emails. Paste just the table HTML — you don't need the full page.
<table> <thead> <tr><th>Name</th><th>Age</th></tr> </thead> <tbody> <tr><td>Alice</td><td>30</td></tr> <tr><td>Bob</td><td>25</td></tr> </tbody>
</table> // Converts to:
[ { "Name": "Alice", "Age": 30 }, { "Name": "Bob", "Age": 25 }
]<table> <tr><td>Product</td><td>Price</td></tr> <tr><td>Widget</td><td>9.99</td></tr>
</table> // First row is used as headers automaticallyIf there's no <thead>, the first <tr> is treated as the header row.
The tool reads cell content in order without interpreting colspan or rowspan attributes. Tables with merged cells may produce misaligned data. Unmerge cells before converting for best results.
Only the first <table> element in the input is processed. If your HTML contains multiple tables, separate them and convert one at a time.
HTML entities like &, , and < are automatically decoded to their text equivalents in the JSON output.
You should land here first if your task already names this workflow. The examples, defaults, and answers on HTML Table to JSON Converter assume that context.
If your task is more general or you have not narrowed down the workflow yet, start in the Data Conversion Tools and let it route you to the right page.
Paste the HTML containing a <table> element and click "Convert to JSON". Headers are detected from <thead> or the first row, and data rows become JSON objects.
No. You only need the <table> element and its contents. The tool finds the first table in whatever HTML you provide.
Right-click the table in your browser, choose "Inspect", find the <table> element in DevTools, right-click it, and select "Copy > Copy outerHTML".
Yes. The HTML is parsed using your browser's built-in DOMParser. No data is sent to any server.
Move between CSV, JSON, XML, YAML, SQL, tables, and developer-friendly formats with converter pages grouped by workflow.
Need more context before using the tool? Start with one of these workflow guides.