Skip to main content

HTML Table Extractor

Extract <table> data from pasted HTML into CSV, TSV, JSON or Markdown, expanding merged colspan/rowspan cells.

Input

Drop a file or browse
One file · text
Or

Paste a whole page or just the table markup — everything outside <table> is ignored.

A 1-based table number, or "all" to extract every table on the page.

Used as JSON object keys and as the Markdown header row.

Repeats a merged cell's value across every column and row it spans, so columns stay aligned.

Output

Extracted data
Tables found
#RowsColumnsCaption / first cell
No data yet
Was this helpful?

Guides

Scraped a page and ended up with a wall of <table> markup? Paste it here and get clean, structured data back — CSV for a spreadsheet, TSV when your cells are full of commas, JSON for code, or a Markdown table for a README. Everything runs in your browser; the HTML never leaves your machine.

How to use it

  1. Paste your HTML into the input box, or drop an .html file onto the uploader. A whole saved page is fine — anything outside a <table> is ignored.
  2. Pick the output format: CSV, TSV, JSON or Markdown.
  3. If the page has more than one table, check the Tables found list underneath, then put that table's number in Table to extract. Type all to pull every table at once.
  4. Leave First row contains headers on if row one holds column names — it becomes the JSON object keys and the Markdown header row.
  5. Copy or download the result.

Settings

  • Table to extract — a 1-based number (1, 2, 3…), or all. Tables nested inside another table's cells are counted as part of their parent, not as separate tables.
  • First row contains headers — with JSON output, on gives you an array of objects keyed by the header text; off gives you an array of arrays. With Markdown, off inserts an empty header row so the table still renders.
  • Expand merged cells — see below.

How does it handle colspan and rowspan?

It expands them. A cell with colspan="3" writes its value into all three columns it covers, and a rowspan="2" cell repeats into the row below it. The result is a dense rectangle where column 3 of every row really is column 3, which is what a spreadsheet or a JSON consumer needs. Most extractors skip this and hand you ragged rows you have to realign by hand.

Turn Expand merged cells off if you'd rather each <td> contribute exactly one cell — useful when you're inspecting the raw markup structure rather than the rendered grid.

What happens to formatting inside a cell?

Inline tags (<a>, <strong>, <span>…) are stripped and only the text is kept. <br> becomes a space, HTML entities like &amp;, &nbsp; and &#8212; are decoded, and runs of whitespace collapse to a single space — so a cell that was pretty-printed across five indented lines comes out as one tidy value.

Can it fetch a table from a URL?

No, and that's deliberate: nothing is uploaded or fetched, so the tool works on internal pages, logged-in dashboards and localhost just as well as on public sites. Use your browser's "View source" or DevTools → Copy element, then paste.

Why are commas quoted in my CSV?

Because a cell containing a comma, a quote or a line break would otherwise break the column layout. The output follows normal CSV quoting rules ("Grace, R.", with any inner " doubled), so spreadsheets import it correctly. If you'd rather avoid quoting entirely, switch to TSV.

Related tools

Going the other direction — turning data back into markup — is what JSON to HTML Table does. To reshape the CSV you get out of here, CSV Column Extractor picks and reorders columns, and Table to Markdown Converter handles pasted spreadsheet data. If you want the whole page as prose rather than just its tables, use HTML to Markdown.

htmltablecsvtsvjsonmarkdownscrapingextract

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.