HTML Table to CSV

Extract data from an HTML table and convert it to CSV.

About HTML Table to CSV

Data on a web page is often trapped in an HTML table: rankings, prices, timetables, statistics. Copying it into a spreadsheet often merges cells or drops columns. This tool parses the HTML you paste, finds the first <table>, reads its header cells and rows and produces a clean CSV with proper quoting.

Paste the HTML source, click Convert, then copy the CSV or download it. Parsing uses the browser's own DOMParser, so the HTML never leaves your computer.

How to use HTML Table to CSV step by step

  1. Open the page source or inspect the table in your browser and copy the HTML that contains the <table> element.
  2. Paste it into the HTML box and click "Convert table to CSV".
  3. Check the CSV in the result box; type a file name and click "Download CSV".

Input and output example

Input

<table>
  <thead><tr><th>Team</th><th>Points</th></tr></thead>
  <tbody>
    <tr><td>Real Betis</td><td>45</td></tr>
    <tr><td>Sevilla FC</td><td>41</td></tr>
  </tbody>
</table>

Output

Team,Points
Real Betis,45
Sevilla FC,41

Why use our HTML Table to CSV?

Common use cases

Limits and tips

Frequently asked questions

How do I get the HTML of a table from a website?

Right-click the table, choose Inspect, find the <table> element in the developer tools, right-click it and select Copy > Copy outerHTML. Then paste that into the tool. Alternatively view the page source and copy the table section.

Why is the result empty?

No <table> element was found in the pasted text, for example because the page builds the table with div elements or loads it with JavaScript after the source was copied. Copy the element from the developer tools, which shows the rendered DOM, rather than from the raw source.

What happens with nested tables?

The outer table is converted and cells that contain inner tables are flattened to their text. For a nested table, copy only that inner <table> element and convert it on its own.

What is the difference between copying a table into Excel and using this tool?

Pasting into Excel depends on the browser and can merge cells, convert numbers or bring along images and links. This tool reads the table structure directly and writes a plain CSV where every cell is exactly the visible text, quoted when needed.

Is the HTML uploaded anywhere?

No. The HTML is parsed by the DOMParser built into your browser and the CSV is generated locally.

Related tools

Other free utilities you may find useful

Available languages