HTML Table to JSON Converter
Convert scraped or generated HTML tables to JSON — array of objects with the first row as keys. Useful for feeding HTML-table data into JSON-consuming code without manually transforming.
How to use the HTML Table to JSON Converter
Paste HTML that contains a <table>. The first row is read as keys and each following row as an object. Toggle type casting if you want booleans, numbers, and empty cells converted, then copy the JSON.
Extracting tables as JSON
An HTML <table> is built for display, not for code — to use it as data you need structured records, each row an object keyed by the column headers. Doing that by hand for a scraped or generated table is tedious and easy to get wrong.
This parses pasted HTML and emits a JSON array of objects, taking the first row as keys and each later row as a record, with optional type casting so values like true, 42, and empty cells become real booleans, numbers, and null. For comma-separated output instead, use the HTML table to CSV converter; to turn the resulting array into newline-delimited records, the JSONL converter.
Common use cases
- Scrape into JSON — turn a web table into an array of objects.
- Feed an API — get table data into JSON for a request body.
- Cast types — convert booleans, numbers, and empty cells to real JSON types.
- Key by header — the first row becomes the object keys automatically.
- Seed a fixture — build JSON test data from an HTML table.