ToolLineup

HTML Table to JSON Converter

This HTML to JSON converter turns a table on any page into an array of JSON objects keyed by the header row — the quickest route to structured data from a site that offers no export button. A th row or a thead becomes the keys; a table with neither is treated as all data with generated column names. Cell markup is reduced to text and HTML entities are decoded before anything is read, so values come out as the page displays them. Type detection turns 42 into a number and true into a boolean, while deliberately leaving values with leading zeros as strings so reference numbers, postcodes and IDs survive intact.

How it works

Turns a table on a page into an array of objects, keyed by the header row. This is the quickest way to get data out of a page that offers no export button.

Type detection turns 42 into a number and true into a boolean, while leaving values with leading zeros as strings so reference numbers survive. Cell markup is reduced to text and entities are decoded first.

The conversion runs entirely in your browser — nothing you paste or upload is sent to a server.

HTML input
Paste an HTML page or just a <table> element…
JSON output

How to convert an HTML table to JSON

  1. Paste the page source — or just the <table> element — into the input on the left.
  2. If the page has several tables, step through them with the table number box.
  3. Copy the result, or download it as a .json file.

When a site has no export button

Plenty of internal admin panels, documentation sites and wikis render a perfectly good table and offer no way to download it. Copying the table's markup out of the browser inspector and pasting it here is usually faster than writing a scraper, and it needs no credentials, no headless browser and no network round trip.

What the keys come from

A row of <th> cells, or any row inside a <thead>, supplies the object keys. Tables that use <th> down the left edge instead are handled too — only the first qualifying row is treated as a header, so the remaining rows are not swallowed. With no header cells at all, keys become col1, col2 and so on.

Types, and the leading-zero rule

Numbers and booleans are detected so the output is usable data rather than a wall of strings. One case is deliberately excluded: a value with a leading zero stays a string, because turning 01234 into 1234 would quietly corrupt postcodes, phone numbers and account references.

Common use cases

  • Lifting a reference table out of documentation into something you can work with.
  • Capturing a report from a web admin panel that has no export button.
  • Turning a wiki table into data you can sort, filter or load.

Frequently asked questions

How do I convert an HTML table to JSON?

Paste the page source or just the table element into the left panel. An array of objects appears on the right, keyed by the header row.

What if the table has no header row?

Columns are named col1, col2 and so on, and every row is treated as data. Nothing is lost — you can rename the keys afterwards.

Are values typed?

Yes. Numbers and booleans are detected and written as real JSON types. Values with leading zeros stay strings, because turning 01234 into 1234 would corrupt identifiers.

Does it handle nested markup in cells?

Yes. Links, spans, bold runs and line breaks are all reduced to the text they display, so the value matches what a reader sees.

What if there are several tables on the page?

The note under the output tells you how many were found; step through them with the table number box.

Is anything uploaded?

No. Parsing happens entirely in your browser.

Related tools