HTML Table to CSV Converter
Paste a source containing an HTML <table> tag to convert it into CSV/TSV. Handy when you want to copy a table from another site into a spreadsheet. Header rows inside thead are automatically recognized, and the entire conversion runs in your browser — no data is sent to a server.
How an HTML table row maps to a CSV row
| One HTML row | <tr><td>name</td><td>age</td><td>city</td></tr> |
|---|---|
| Resulting CSV notation | name,age,city |
Rows inside <thead>, or a first row made up only of <th> cells, are recognized as the header row; every other <tr> is converted into one row of CSV.
Tips
- Even without
<thead>/<tbody>tags, a first row whose cells are all<th>is automatically recognized as the header row. - Decorative tags such as
<strong>and<br>inside a cell are automatically stripped, leaving only the text content to be converted into CSV. - Selecting and copying a table from another site in your browser often places HTML-formatted data on the clipboard as well, so you can paste it directly into this tool to convert it.
- This is the reverse of the sister tool, CSV to HTML Table Converter, so using the two together lets you move back and forth between CSV and HTML tables.
Frequently Asked Questions
<table> section from the page's view-source view (e.g. Ctrl+U) and paste it in.<thead> tag, the first <tr> is treated as the header row if all of its cells are <th>. If that's not the case either, every row is converted as-is as a data row.<table> tag found is converted. If you want to convert multiple tables, paste and convert each table's HTML separately.
Side Note — Why does a browser's "table copy" include HTML?
When you select and copy a table in your browser, the clipboard ends up holding not just the visible text but HTML-formatted data as well, stored behind the scenes. This works because the OS clipboard supports "multiple formats": the source application writes several representations at once (plain text, HTML, rich text, etc.), and the destination application can pick whichever format suits it best.
This mechanism is why pasting a table from another site directly into Excel or a spreadsheet can reproduce formatting and even links. On the other hand, when the destination is a plain text editor or a CSV file, this underlying HTML information goes unused and the data is treated as plain text, which tends to lose the tabular structure — which cell belongs to which column.
A tool like HTML Table to CSV Converter exists precisely to explicitly restore that easily-lost structural information. By making direct use of the HTML structure carried by a browser's table-copy feature, it lets you reuse the data as correctly column-separated content in a spreadsheet — an unglamorous but reliably in-demand category of everyday practical work.