Skip to content
Jellykit

HTML Table to CSV Extractor

Extract every table from pasted HTML into CSV, TSV or JSON, with rowspan and colspan cells expanded.

  • Runs on your device
Loading tool

About HTML Table to CSV Extractor

Paste the source of a web page, an email or an exported report, and every <table> in it comes out as rows you can open in a spreadsheet. Merged cells are expanded so each row has the same number of columns: the text of a cell that spans several rows or columns is repeated in each, or left blank if you prefer.

Cell text is taken as a reader sees it: entities are decoded, white space is collapsed, <br> and paragraphs become line breaks, and scripts and styles are ignored. Nothing in the HTML is run or loaded.

How it works

  1. The HTML is read by your browser’s own parser into an inert document: scripts do not run and images are not fetched.
  2. Each table is laid out cell by cell as the HTML table model does: a cell with rowspan or colspan fills every slot it covers, and rowspan="0" reaches to the last row.
  3. Rows inside <thead>, or made only of <th> cells, are treated as headings. In JSON they become the keys of each row object; repeated or blank headings are numbered so no column is lost.
  4. Tables nested inside another table’s cells are listed as tables of their own, after the table that holds them. Turn them off to keep only the outer ones.

Questions

How do I get a table from a live web page?

Open the page, use your browser’s View Source or Inspect, copy the HTML that holds the table (or the whole page) and paste it here. This tool does not fetch pages itself.

How are several tables put into one CSV file?

They follow one another, separated by an empty line. To get one table on its own, choose One table and its number. In JSON each table is a separate entry with its caption.

Are links and formatting kept?

No. Only the text of each cell is kept, as it would be read on the page. Links, bold text and images are dropped.

Is there a size limit?

The HTML can be up to 5 MB, and the tables up to 2 million cells in all once merged cells are expanded.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.