HTML Table to JSON Converter

Paste an HTML table or a page snippet and convert every table to JSON and CSV in your browser. The markup you paste stays on your device.

The HTML Table to JSON Converter parses the markup you paste entirely in your browser. The table HTML and the JSON or CSV it produces stay on your device and are never uploaded to ArrayKit.

Open the JSON Formatter

About HTML Table to JSON

The HTML Table to JSON Converter turns any pasted <table> — or a whole page snippet full of them — into a clean JSON array of row-objects and matching CSV. Each header cell becomes a key, so a row like <td>Ada</td><td>Admin</td> reads as { "Name": "Ada", "Role": "Admin" }. It understands thead and tbody, uses th cells as headers, synthesizes column_1, column_2 labels when a table has none, and expands colspan and rowspan so every row lines up in a rectangular grid. When the markup holds several tables you can switch between them and copy each result on its own. It is built for scraping a report, moving a spec sheet into code, or seeding a fixture from documentation. The HTML you paste is parsed locally and never leaves your device.

Features

How to use the HTML Table to JSON

  1. Paste an HTML <table> or a page snippet that contains one or more tables
  2. Switch between JSON and CSV with the format toggle
  3. If several tables were found, pick one from the Table selector
  4. Copy the output or download it as a .json or .csv file

Example

Input

<table><thead><tr><th>Name</th><th>Role</th></tr></thead><tbody><tr><td>Ada</td><td>Admin</td></tr><tr><td>Linus</td><td>Author</td></tr></tbody></table>

Output

[
  { "Name": "Ada", "Role": "Admin" },
  { "Name": "Linus", "Role": "Author" }
]

The <th> cells become the object keys and each <tr> becomes one row-object.

Common errors & troubleshooting

Frequently asked questions

How does the converter pick the JSON keys from my table?
It uses the header cells. A <thead> row, or a first row that contains <th> cells, supplies the keys. Each following row becomes one object whose values are aligned to those headers by column position.
What happens to colspan and rowspan cells?
They are expanded into a dense grid. A colspan cell is repeated across every column it covers, and a rowspan cell is carried down into each row it spans, so every row-object has the same set of keys.
Can it extract more than one table from a page snippet?
Yes. Paste a whole snippet and every <table> is extracted in document order. A Table selector lets you switch between them and copy each table's JSON or CSV separately.
What if my table has no header row?
When there is no <thead> and no <th> in the first row, the tool synthesizes keys named column_1, column_2, and so on, and treats every row as data instead of dropping the first one.
Does it also output CSV, not just JSON?
Yes. Flip the format toggle to CSV to get an RFC-4180 export where values containing commas, quotes, or newlines are quoted correctly. You can copy it or download a .csv file.
Is the HTML I paste uploaded anywhere?
No. The markup is parsed in your browser with the standard DOM parser and the resulting JSON and CSV are built on your device. The pasted table is never sent to a server.

Related tools

All ArrayKit tools