Productivity and Utilities

HTML Table to CSV Converter

Paste HTML that holds a table and choose which one to turn into CSV.

Your numbers

Up to 500,000 characters. The page is read in your browser and nothing is uploaded.

Tables are numbered in the order they appear.

Result

Table 1 grid

4 rows x 3 columns

Tables found
1
Merged cells expanded
2
Output
CSV

Rows

RowCells
1Fruit | Fruit | Price
2Apple | Red | 1.20
3Apple | Green | 1.10
4Pear | Green | 1.50
How this was calculated
  1. Rows and cells are read in order. A cell with colspan or rowspan fills every grid position it covers with the same text, so the grid is a clean rectangle.
  2. Whitespace is collapsed, character codes such as & are decoded, and line breaks inside a cell become spaces. A table inside a cell is read as its own table.
  3. In CSV a cell with a comma, a quote or a line break is wrapped in quotes and quotes are doubled.
  • Only the HTML you paste is read. Tables that a page builds with scripts are not in the pasted source, so copy the rendered HTML from your browser tools if needed.

Calculated using SumPanda.com · https://sumpanda.com/html-table-to-csv-converter/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the html table to csv converter

  1. Paste the HTML that contains the table, or several tables, into the box.
  2. If the HTML has more than one table, enter the number of the one you want.
  3. Choose CSV, tab separated text or JSON objects.
  4. Check the grid in the preview, then copy the result or download the CSV.

Formula

read rows and cells in order

a cell with colspan or rowspan fills every grid position it covers with its text

whitespace is collapsed and character codes such as & are decoded

CSV: a field with a comma, a quote or a line break is wrapped in quotes and quotes are doubled

A table inside a cell is read as its own table, numbered in the order its opening tag appears, and its text is left out of the cell around it.

Merged cells

The default table has a header cell that spans two columns, an Apple cell that spans two rows and three more data cells. The grid is 4 rows by 3 columns, with the header text repeated in the first two columns and Apple repeated in both of its rows. The CSV is Fruit,Fruit,Price then Apple,Red,1.20 then Apple,Green,1.10 then Pear,Green,1.50.

In a second table with the cell A "quoted" name and the cell one, two, the CSV wraps both in quotes and doubles the quote marks: "A ""quoted"" name","one, two". As JSON objects with the first row as keys, the same table is a list with Name and Note fields.

Why merged cells need care

A spreadsheet needs a rectangular grid, but HTML tables often merge cells for headings and groups. Filling each covered position with the same text keeps every row and column complete, so sorting and filtering still work. If you would rather have the text only once, clear the repeats in a spreadsheet afterwards.

To build a table from CSV, use the HTML Table Generator. The CSV JSON Converter changes the format of the result, the HTML to Text Converter strips the tags from a page, and the Excel to CSV tool handles workbooks.

Getting the HTML

In a browser, you can copy the HTML of a table with the inspector, or use view source and copy the table. Pages that build the table with scripts need the rendered HTML, not the source. Check that you have the whole table, including its closing tag, before pasting.

Assumptions and limits

  • The HTML is read as text and nothing is run or uploaded.
  • Row groups such as thead, tbody and tfoot are read in the order they appear.
  • Spans are limited to 200 cells, tables to 5,000 rows and 200 columns, and the input to 500,000 characters.
  • Images in cells contribute their alt text.
  • Formatting, links and colors are not kept, only the text.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What happens to cells that span rows?

The text is copied into each row the cell covers, so every row of the CSV has the same number of fields.

Can I convert several tables at once?

One table at a time. Change the table number to get the next one.

How are headings handled in JSON?

The first row becomes the keys. Empty or repeated headings get a column number so no data is lost.

Are links kept?

No. Only the visible text of each cell is kept.