HTML Table Converter (CSV / TSV / Markdown / JSON / SQL)

Paste HTML containing one or more tables, choose a table number and an output format, and get CSV, TSV, a Markdown table, a JSON array or SQL INSERT statements.

Use the tool

Why this tool exists

Data often sits in an HTML table with no download button: a report saved as a web page, a status page, an internal wiki or an email. Copying it into a spreadsheet can mangle merged cells, and writing a script just to read one table is more effort than the task deserves.

This converter parses the table markup, resolves colspan and rowspan, strips inner tags and decodes entities, then writes the format you need. If the page has several tables, pick one by number or convert them all. It is useful for turning a table into a Markdown README section or a quick database import. Everything happens in your browser, so a private report is not uploaded.

How to use it

  1. Paste the HTML that contains the table or tables.
  2. Choose the output format: CSV, TSV, Markdown, JSON or SQL INSERT.
  3. Set the table number, or 0 for all tables, and say whether the first row is a header.
  4. Copy the result, and enter a table name first if you chose SQL.

Frequently asked questions

What happens with merged cells?

Colspan and rowspan are expanded so each row has the same number of cells, with the merged value repeated. That keeps the grid rectangular, which CSV, SQL and JSON all need.

Do I need the whole web page?

No. You can paste only the table element, or a larger piece of HTML containing it. The tool looks for table elements and ignores everything else around them.

How are the SQL values written?

As INSERT statements into the table name you give, with text quoted. Column types are not guessed, so create the table with suitable types yourself and check numbers and dates before running the script.