HTML Table to CSV
Paste HTML markup containing a table — or upload a file up to 200MB — and get back clean CSV rows.
How to use this tool
Paste HTML containing a table, from View Source, your browser's developer tools or an HTML email, or upload an .html file. The CSV updates as you paste, and Download saves it as a .csv. Only the first table in the HTML is read.
Worked example: a pricing table
<tr><th>Plan</th><th>Price</th><th>Users</th><th>Code</th></tr>
<tr><td><a href="/plans/basic">Basic</a></td>
<td><span class="label">Price: </span>₹1,299</td>
<td>1,200</td><td>004102</td></tr>Plan,Price,Users,Code Basic,"Price: ₹1,299","1,200",004102
Values with a comma are wrapped in quotes so they stay in one column. Nothing is converted: 004102 keeps its zeros and ₹1,299 keeps its symbol, because a CSV is only text. The link keeps its words but not its address. The "Price:" label is the one surprise. Responsive tables sometimes hide a label like that inside each cell and show it only on phones; it is still part of the cell's text, so it comes through. Delete it with Find & Replace in your spreadsheet, or remove the <span> elements before pasting.
Opening the CSV in Excel
Excel re-interprets a CSV as it opens it, which undoes some of that care: 004102 becomes 4102, and a long reference number turns into scientific notation. If those columns matter, either import the file with Data → From Text/CSV and set them to Text, or use the HTML Table to Excel converter, which writes those cells as text in the first place.
Frequently Asked Questions
What if the page has multiple tables?
This tool converts the first <table> element found in the pasted HTML. If you need a different table, trim the pasted source down to just the table you want, or paste each table separately — the parser always takes the first match rather than trying to guess which table you meant.
Does it handle merged cells (colspan/rowspan)?
Yes. CSV is a strict grid with no concept of a cell spanning several columns or rows, so a merged cell's text is repeated in every position it covers: a region name with rowspan="2" appears on both rows, and a quarter heading with colspan="3" appears above all three month columns. That keeps every other value in its correct column, and makes the rows easy to filter or sort afterwards.
What happens to links, images and line breaks inside a cell?
Each cell becomes its visible text. A link keeps its text but not its URL, an image contributes nothing (its alt text is not used), and a line break or paragraph inside a cell becomes a single space, so "Pune<br>Maharashtra" arrives as "Pune Maharashtra". A table nested inside a cell is flattened into that one cell's text.
Related Tools
Related Blog Posts
Extract Meta Tags and Tables From HTML (to CSV or Excel)
How to check a page's title, description, canonical and social tags from its source, the JavaScript-rendering trap that makes View Source lie, and how to pull a table with merged cells into a spreadsheet.
Read moreHow to Convert JSON to Excel, CSV, XML and YAML (and Back)
What actually happens to your data when JSON becomes a spreadsheet, XML, or YAML: missing keys, nested values, leading zeros, and the XML array problem, with real converter output.
Read moreConverting CSV and XML to Excel Without Losing Data
Why double-clicking a CSV mangles PIN codes, long IDs and ₹ signs, what a careful CSV-to-Excel conversion does instead, and how XML records map to spreadsheet columns.
Read more