Format Code Now
/
ConvertHTML Table to CSV Next: HTML to JSON ›

HTML Table to CSV Converter

CV-99

Paste HTML and get the tables inside it as CSV, one line per table row. Pick one table or all of them.

Runs in your browser. Nothing is uploaded.

HTML containing one or more tables

CSV

How to use it

  1. Paste the HTML, or open an .html file.
  2. Choose which table: first, second, and so on, or all tables.
  3. Pick the CSV delimiter.
  4. Press HTML to CSV, then copy or download the file.

What gets read

Only table content is exported: every row of th and td cells becomes one CSV line. Cell text is the visible text, with line breaks and runs of spaces collapsed to one space and character references such as & turned back into characters. Script and style content is ignored. Links, images and text outside tables are not exported. Messy markup is fine; missing closing tags for tr and td are handled the way browsers handle them.

Merged cells and nested tables

A cell with colspan or rowspan is repeated in each position it covers, so every row has the same number of columns. A table inside another table is exported as its own table and listed after the table that contains it. With All tables selected, the tables are separated by one blank line. Header rows get no special treatment, they are just the first line.

Error messages and what to do

MessageWhat it meansFix
No <table> with rows found in the HTMLThe markup has no table, or the table has no rows.Paste markup that includes a <table> with <tr> rows.
Table 3 was requested but the HTML has only 1 tableYou chose a table number the HTML does not have.Pick a lower number or All tables.

Questions people ask

How do I convert an HTML table to CSV?

Paste the HTML that holds the table, leave the table on First, and press HTML to CSV. Copy the output or download it as a .csv file. If the page has several tables, choose the one you want.

Can I copy a table from a web page into this tool?

Yes. Use your browser to view the page source or inspect the table, copy the table markup, and paste it here. The tool reads the markup you paste and does not fetch pages.

What happens to merged cells?

Spanned cells are repeated in every position they cover. That keeps the columns aligned, but the repeated value will appear in each place, so check the output if a merged header was meant to stand alone.

Does it keep links and bold text?

No. Only the visible text of each cell is exported. Tags inside a cell are dropped, and the text of a link or bold phrase stays. Line breaks inside a cell become a single space.

Will Excel read formulas from my cells?

A cell that starts with = + - or @ can be run as a formula when a spreadsheet opens the file. An option prefixes those cells with an apostrophe. It changes the value, so it is off by default.

About this tool

Reads the HTML with a small tolerant parser built into this page, so broken markup such as missing closing tags is accepted and nothing is fetched. Only <table> content is converted: every row of cells becomes a CSV line. A cell with colspan or rowspan is repeated in each position it covers so columns line up. Cell text is the visible text with line breaks and runs of spaces collapsed to one space, character references such as &amp; are decoded, and script and style content is ignored. Nested tables are listed as separate tables, after the table that contains them. Choose which table to export, or All tables to get each one separated by a blank line. Header rows are not treated specially. Text outside tables, links and images are not exported.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.