Skip to content

Html Table To Json API

POST https://api.findutils.com/api/tools/html-table-to-json/execute

Convert an HTML <table> into JSON — an array of objects keyed by the header row, or an array of row arrays. Cell text is extracted with tags stripped and entities decoded. Empty header cells become column1, column2, ….

Request body

application/json
  • html

    string required

    HTML that contains at least one <table> element. A full page is fine; the first table is used unless table_index is set.

  • format

    string optional

    "objects" (default) maps each row to an object; "arrays" returns rows as string arrays. One of objects · arrays. Default "objects".

  • first_row_headers

    boolean optional

    When format is "objects", use the first row as object keys (default true). When false, keys are column1, column2, …. Default true.

  • table_index

    integer optional

    Zero-based index of the table to convert when the HTML has several. Default 0. Default 0.

Example arguments

Verified
{
  "html": "<table><tr><th>Name</th><th>Age</th></tr><tr><td>Ann</td><td>30</td></tr></table>"
}