How to use the HTML Table → JSON
1. Copy the <table>…</table> HTML from a web page (right-click → Inspect → copy element) or from an HTML file.
2. Paste it into the input field on the left.
3. The JSON array appears instantly on the right — copy it for use in your code, API, or database.
What is it?
HTML tables are everywhere — API documentation, Wikipedia, financial sites, data portals — but their data is locked inside markup. This tool extracts that structured data and converts it to a clean JSON array of objects, ready to use in any programming language or API.
Column headers are sourced from <th> elements (or the first row of <td> elements if no <th> exists). Each subsequent <tr> of <td> elements becomes one JSON object, with the column header as the key and the cell text as the value.
The output is standards-compliant JSON — all string values, no type coercion. If you need numbers parsed as integers or floats, post-process the JSON with your language's built-in type conversion after import.
Example
<table>
<thead>
<tr><th>Name</th><th>Role</th><th>Team</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>Engineer</td><td>Platform</td></tr>
<tr><td>Bob</td><td>Designer</td><td>Growth</td></tr>
</tbody>
</table>[
{ "Name": "Alice", "Role": "Engineer", "Team": "Platform" },
{ "Name": "Bob", "Role": "Designer", "Team": "Growth" }
]<th> text becomes the JSON key. <td> text becomes the string value. All values are strings.
Benefits
Share structured data with anyone, in any format
CSV output opens directly in Excel and Google Sheets; XML works with legacy enterprise systems; JSON feeds every modern API — convert to whatever format your audience needs.
Bridge incompatible data formats without a custom script
Convert between JSON, CSV, XML, and YAML in one click — the most common inter-system data translation handled instantly, without writing a parser or ETL pipeline.
Inspect, compare, and debug complex JSON structures
Sort, extract, compare, and measure JSON to find unexpected keys, spot structural differences between API versions, and diagnose oversized payloads.
Migrate legacy data to modern formats
Convert XML configs, PHP print_r() dumps, or CSV exports to clean JSON — without writing a one-off migration script that will never be used again.
Frequently asked questions
Are cell values always strings in the output?
Yes. All values are output as JSON strings. This preserves data exactly as displayed — including currency symbols, formatted numbers, and dates. Apply type conversions in your own code if needed.
What if the table has no <th> header row?
If no <th> elements are found, the first row of <td> elements is used as column headers. If the table has no header row at all, the first data row will be consumed as headers.
Can I use this to scrape Wikipedia tables?
Yes. Inspect the Wikipedia page, copy the <table class='wikitable'>…</table> HTML, and paste it here. Complex tables with merged cells may need manual cleanup.
Is my data sent to a server?
No. All processing happens entirely in your browser using JavaScript. Your data never leaves your device.