HTML Table to CSV Converter

Paste the HTML of a table and get its data as a CSV file.

How to use

What it checks and how it works

The pasted HTML is parsed with node-html-parser and every table element is read as a grid of rows and cells, following the table model of the HTML Living Standard. A cell with rowspan repeats its text down the rows it covers, and a cell with colspan leaves the extra columns empty so every row has the same width. Line breaks inside cells become spaces, and the output is quoted as RFC 4180 requires. The tool works only on HTML you paste: it cannot fetch a page for you, and it cannot read tables drawn by scripts that were not in the pasted HTML. Nested tables are not exported as separate tables.

How do I get the HTML of a table?

Right-click the table in your browser, choose Inspect, then copy the table element as HTML. Or view the page source and copy the table from there.

Why is my table missing?

Some pages build tables with scripts after loading, so the table is not in the page source. Copy it from the inspector, which shows the page after the scripts ran.

How are merged cells handled?

A cell merged down repeats its value in each row it covers. A cell merged across leaves the extra columns empty, so the columns still line up.

Sources

Related tools

Privacy

Runs in your browser; nothing is uploaded. The interactive tool needs JavaScript.