Convert HTML tables into JSON arrays in your browser. Paste HTML or open an .html file, pick the table, choose how headers are detected, preview the rows, optionally infer basic types, then copy or download the JSON.
Extract table headers and rows from HTML and turn them into a JSON array of objects, one object per table row, using cell text content.
See how many tables the input contains and convert the one you select by index. Rows belonging to a table nested inside a cell stay with that nested table.
Use header cells found in thead or a leading row of th elements, force the first row to be the header, or generate column_1, column_2, and so on.
Preview the detected headers and the first 10 data rows before exporting, together with the row, column, and table counts.
When enabled, lowercase true and false become booleans and plain integers or decimals become numbers. It is off by default, so values such as 00123 and SKU-001 stay strings.
Get warned about colspan and rowspan, duplicate or empty header names, tables with more than one header row, and rows with a different number of cells.
Copy the generated JSON array to the clipboard for scripts, APIs, databases, or data-processing workflows. Copy always includes every row, not just the previewed ones.
Download the extracted table data as a .json file for local storage, analysis, testing, or further conversion.
HTML parsing and JSON generation happen in your browser. No account is required and the input HTML is not sent to a remote service.
Paste HTML that contains a table, or open a local .html, .htm, or .txt file. This page is built for table markup, not for fetching or crawling a remote page.
When the input contains more than one table, choose which one to convert. The number of tables found is shown above the preview.
Choose whether headers are detected from th elements, taken from the first row, or generated. Decide whether to trim cell text, infer basic types, or turn empty cells into null.
Check the detected headers, the first 10 rows, the row and column counts, and any warning about spans, renamed headers, or uneven rows.
Click Convert to JSON, then copy the result or download it as a .json file. The output also updates automatically while you type.
A basic table with a header row, converted into an array of JSON objects.
<table>
<thead>
<tr><th>Name</th><th>Age</th><th>City</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>30</td><td>New York</td></tr>
<tr><td>Bob</td><td>25</td><td>London</td></tr>
</tbody>
</table>A thead section with three th cells and a tbody with two data rows.
[
{
"Name": "Alice",
"Age": "30",
"City": "New York"
},
{
"Name": "Bob",
"Age": "25",
"City": "London"
}
]Default options: headers detected from thead, type inference off, so 30 and 25 stay strings.
Turn on Infer basic types to output 30 and 25 as JSON numbers. The preview shows the first 10 rows; copy and download always include every row.
HTML Table to JSON conversion parses HTML markup and represents table data as JSON. The usual result is an array of objects: each table row becomes one object, and each column becomes a property.
This is different from representing a whole document as a JSON DOM tree with tags, attributes, text, and children. This page extracts tables only; it does not serialize an entire page.
Input:
<table>
<thead>
<tr><th>Name</th><th>Age</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>30</td></tr>
</tbody>
</table>Output with the default options:
[
{"Name":"Alice","Age":"30"}
]Age stays the string "30" because type inference is off by default. Turn it on to get the number 30.
Column names can come from an explicit thead section, from a leading row of th cells, or from generated names. When a header cell is empty it becomes column_N for that position, and a repeated name gets a numeric suffix such as Name_2, so no column is silently dropped. Both cases are reported as a warning.
If a table has more than one header row, this page uses the first one and warns you, because grouped or stacked headings cannot be flattened unambiguously.
A cell with colspan="2" occupies two logical positions, and rowspan spans several rows. Correctly expanding them requires building a grid and filling every position a spanning cell covers. This version does not do that: it reads each row as written and warns when a span is present, so the column alignment can be checked by hand instead of being silently wrong.
Values are read from cell text content. Tags inside a cell contribute their text, so <td><strong>Alice</strong></td> yields Alice. Markup and attributes such as href or src are not extracted. That keeps the output plain data, and it also means links and images inside a table are not part of the result.
Table cells are text, and text has no type. With inference enabled, lowercase true and false become booleans and plain integers or decimals become numbers. Values such as 00123, SKU-001, 1e5, and TRUE are never converted, so identifiers, postal codes, and formatted amounts stay intact. Keep the option off unless numeric types are what you need.
This tool parses HTML that you paste or open locally. It does not fetch URLs, run JavaScript, follow pagination, or evaluate access policies. For repeated extraction from live sites, a local scraper or a build-time step is the right tool; the browser converter is for saved markup, copied fragments, and one-off extraction.
Parsing and conversion happen in the browser, so the HTML you paste stays on your device. That suits saved pages and exported markup, but it is not a secret-management system. Avoid pasting authenticated page content, credentials, or confidential customer data into any online tool.
For many files, repeated jobs, very large documents, or confidential content, use a local HTML parser and keep the conversion in your own pipeline. Browser conversion is best for quick extraction, inspection, and small-to-medium tables.