HTML Table to JSON Extractor
Paste HTML containing a table and instantly extract the data as a clean JSON array
Paste any HTML containing <table> elements and get structured JSON back in one click. Headers are detected from <th> tags automatically, numbers and booleans get typed correctly, and pages with multiple tables let you pick which one you want.
Handy when you’re scraping data from old report pages, pulling inventory out of admin panels, or grabbing grades off a university portal. And everything runs in your browser. Nothing gets uploaded.
How It Works
Your HTML gets fed into the browser’s built-in DOMParser. It scans for <table> elements, pulls out headers from <th> tags (or falls back to the first row), then walks each <tr> to build row objects. The result is a JSON array where each row is a key-value object — ready to drop into an API call, a database import, or a script.
Examples
Simple contact list
You copied a two-column staff directory from an intranet page.
<table>
<tr><th>Name</th><th>Email</th></tr>
<tr><td>Ana Torres</td><td>[email protected]</td></tr>
<tr><td>Raj Patel</td><td>[email protected]</td></tr>
</table>
[
{"Name":"Ana Torres","Email":"[email protected]"},
{"Name":"Raj Patel","Email":"[email protected]"}
]
Product table with prices and stock counts
An e-commerce admin panel exports inventory as HTML. You need the numbers typed correctly for a script that checks low-stock items.
<table>
<thead><tr><th>SKU</th><th>Price</th><th>Stock</th></tr></thead>
<tbody>
<tr><td>WDG-441</td><td>29.99</td><td>182</td></tr>
<tr><td>BLT-009</td><td>7.50</td><td>0</td></tr>
</tbody>
</table>
[
{"SKU":"WDG-441","Price":29.99,"Stock":182},
{"SKU":"BLT-009","Price":7.50,"Stock":0}
]
Multi-table page — grabbing schedule + grades
A university portal page has the class schedule in one table and final grades in another. You want both as structured data for a personal dashboard project.
<table>
<tr><th>Course</th><th>Day</th><th>Time</th></tr>
<tr><td>CS 201</td><td>Mon</td><td>9:00</td></tr>
</table>
<table>
<tr><th>Course</th><th>Grade</th></tr>
<tr><td>CS 201</td><td>A-</td></tr>
</table>
{
"Table 1": [
{"Course":"CS 201","Day":"Mon","Time":"9:00"}
],
"Table 2": [
{"Course":"CS 201","Grade":"A-"}
]
}
Who Uses This
Pull table data from legacy pages into JSON for API mocking or database seeding.
Grab financial or statistical tables from reports and load them into Python or R scripts.
Extract grade tables or course schedules from university portals for personal tracking apps.
Convert status tables from Confluence or SharePoint pages into JSON for dashboard integrations.
Common Mistakes
If the page uses <div>-based layouts styled to look like tables, the parser won’t find anything. Check the source — you need an actual <table> element in the HTML.
A column of ZIP codes like "07102" becomes 7102 with auto-typing. Turn it off when leading zeros matter — product codes, postal codes, phone numbers.
A table inside a table cell is treated as a separate table, not flattened into the parent. If you see extra tables in the selector, this is usually why. Pull each one individually.
Technical Details
- Processing: 100% client-side — uses the browser’s native DOMParser API
- Browser Support: Chrome, Firefox, Safari, Edge
- Output Formats: Array of objects, array of arrays, or multi-table object
- Auto-typing: Numbers, booleans, and null detection (toggle on/off)
- Max Size: Limited only by your browser’s memory
Frequently Asked Questions
How do I convert an HTML table to JSON?
Paste the HTML that contains your table into the input box and click Extract. The tool reads the <table> structure, identifies headers, and outputs each row as a JSON object. You can copy the result or download it as a .json file.
Does this work with tables that don’t have header rows?
Yes. If there are no <th> elements, the first row is used as headers by default. The keys in your JSON objects will match whatever text is in that first row. You can also switch to "array of arrays" format if you’d rather skip named keys entirely.
Can I extract multiple tables at once?
Absolutely. When the parser finds more than one table, a dropdown appears so you can pick a specific one or choose “All Tables.” Selecting all wraps each table’s data under its own key in a single JSON object.
Is my data sent to a server?
No. The conversion runs entirely in your browser using JavaScript. Nothing is uploaded, stored, or transmitted. You can disconnect from the internet and it still works.
What’s the difference between “array of objects” and “array of arrays”?
Array of objects gives you [{"Name":"Ana","Age":30}] — each row is a keyed object. Array of arrays gives you [["Name","Age"],["Ana","30"]] — plain lists with headers as the first item. Objects are better for APIs. Arrays are smaller and simpler for spreadsheet imports.