Skip to main content

HTML Table to CSV

Turn HTML tables into CSV, TSV or Excel files in your browser. Paste HTML or open a file, pick a table, and download. Nothing is uploaded or run.

Your HTML

Stays in your browser

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to CSV Viewer or CSV to JSON.

Free Online HTML Table to CSV Converter

Copy a table from a web page into a spreadsheet. Paste the HTML or open an .html file, see the tables found, pick one or all, and save them as CSV, TSV or Excel. Nothing is uploaded and no scripts run. Paste the HTML of a web page or open an HTML file, pick one of the tables in it and save it as CSV, TSV or an Excel file. The HTML is read as text and scripts are never run.

How to turn an HTML table into a spreadsheet file

Paste the HTML (for example from your browser's "View source" or "Inspect"), or use the upload button to open an .html file. The tables found are listed below with a preview. Choose one table or all, choose the file type, and press Convert tables.

Honest limits: only the HTML you give is read, so tables a web page draws later with JavaScript are not there unless you copy the final HTML from the inspector. Up to 5,000,000 characters of HTML and 2,000,000 cells are accepted. In the Excel file, text that looks like a plain number is saved as a number; everything else stays text.

Common mistakes

  • Pasting a link instead of the HTML: the tool never visits web addresses. Paste the page's HTML.
  • Expecting formulas or colours: only the text of each cell is kept.
  • Opening a TSV file as if it were a CSV: tab separated files use tabs, not commas.

Frequently asked questions

Is my HTML uploaded or run?
No. The HTML is only read inside your browser, in a hidden copy that is never shown on the page. Scripts in it do not run and nothing is loaded from the web.
How are merged cells handled?
A cell that spans several columns or rows keeps its text in the first box. The other boxes it covers are left empty, or you can choose "Repeat the value" to copy the text into all of them.
What happens with a table inside another table?
Every table is listed on its own, and tables inside tables are marked as such. In the outer table, the cell that holds the inner table shows the inner table's text. Rows of an inner table never leak into the outer table's rows.
Why do accented letters look wrong when I open the CSV in Excel?
The CSV is saved as UTF-8. Some versions of Excel need you to use Data, From Text/CSV to read it as UTF-8. Choose the Excel (.xlsx) format to avoid the problem.
How do I get the HTML of a table on a web page?
Right-click the table, choose Inspect, then copy the table element as HTML and paste it here. You can also use View page source and paste the whole page.

Related tools

More Code & Conversion

View all Code & Conversion tools →