HTML Table to CSV Converter for Pasted Markup
HTML table to CSV conversion reads the markup you paste, keeps the chosen table's rows and cells, and exports quoted CSV you can open in a spreadsheet.
Paste table markup or open a saved .html file. Only tables in the pasted markup are read: this page never fetches a URL and never runs embedded scripts. Up to 2 MB, then 500,000 characters after decoding; the chosen table at most 1,000 rows and 100 columns after span expansion.
Files and pasted text are read in this page; nothing is uploaded and no account is needed. This page also loads analytics scripts, so avoid confidential text.
Preview
Row order follows the parsed table: footer rows come last even if the markup put them first. Column widths and CSS are not exported. CSV output follows RFC 4180 quoting.
CSV export preserves cell text; it does not make formula-like cells safe for spreadsheet software. Review cells before opening in a spreadsheet. OWASP CSV Injection guidance.
Next: make an HTML table from CSV, convert selected CSV to JSON or select CSV columns.
Why convert pasted table markup to CSV?
Paste, do not fetch
The tool reads the markup in the box. It does not take a page address, request a site, or render the pasted table, so a conversion never depends on another server answering.
One table at a time
A pasted page can hold several tables. Each top level table is listed by index, caption and size, and only the table you pick becomes CSV, so a footer layout table does not end up mixed into your data.
Spans reported, not hidden
A merged cell repeats its text across every slot it covers and the repeat count is shown. You see the trade instead of discovering a shifted row later.
How table markup becomes CSV rows
The browser's HTML parser builds a separate document from your markup, and the tool walks that document to find table elements. Nothing from the pasted text is inserted into this page, so an event handler or a script tag in the pasted markup is never attached to anything that runs. Cell text is read as text, which means a cell containing an ampersand or an angle bracket exports those characters rather than live markup.
Each row becomes one CSV record and each cell becomes one field. Runs of spaces and tabs inside a cell collapse to one space, a line break tag becomes a real line break, and the field is quoted, so a two-line cell stays inside one record instead of splitting the row. A field that contains a comma, a double quote or a line break is quoted in the output, and an inner double quote is doubled, following RFC 4180.
Table, header and span rules
- Table choiceOnly top level tables are listed, in document order, each with its caption and the size that can be measured before the cap stops the walk: a table over the row or column cap is still listed and marked, and its refusal names the limit when you try to convert it. A table inside another table is not flattened and not listed, so paste the inner table on its own if you need it.
- Header rowThe option starts on when the first row is all th cells and off otherwise, and you can always change it. Your setting decides, because many real pages mark every cell as td. A blank header cell stays blank and is identified by its column position.
- Merged cellsA colspan or rowspan is expanded to the slots it covers, and the cell text repeats in each of them, because a merged heading does apply to both columns. The number of repeated cells is printed above the output.
- Empty cellsAn empty cell exports an empty field. Empty cells at the end of a row are kept, so every record has the same number of fields.
- Row orderRows follow the parsed table, so a footer row comes last even when the markup put it first. Column widths and CSS are not exported.
- LimitsPasted markup is accepted up to 500,000 characters. The chosen table must be at most 1,000 rows and 100 columns after span expansion, and the CSV must stay under 10,000,000 characters.
Common Use Cases
Scraped price tables
Turn a copied product table into CSV for a spreadsheet, then check the columns against the page before trusting them.
Report snapshots
Save a table from a supplier page or a status page as CSV so two dates can be compared side by side.
Fixture data for a test
Paste a small table from documentation and get rows a test file can use, without retyping each cell.
How to convert an HTML table to CSV
Paste the markup
Copy the table HTML from the page source or a browser inspector and paste it into the box.
Find the tables
Run the table search and check which top level tables were found and how big each one is.
Set the header option
Decide whether the first row holds column names, then run the conversion.
Review and export
Check the repeat count and the grid, then copy the CSV or download the .csv file.
Text in, CSV out
Text, not markup
Cell contents are exported as characters. Markup inside a cell is not reproduced, so the CSV never contains tags.
Reported reshaping
Merged cells change the shape of a table. The count and the policy appear with the result instead of disappearing.
Current result only
Editing the markup, the table choice or the header option clears the old output, so the file you download matches the controls on screen.
Before you trust the export
- •Check the first row: A table with a title row spanning every column needs the header option off and that row deleted in the spreadsheet.
- •Watch wide tables: A layout table used to position a page can look like data. Compare the row count with the visible table.
- •Keep formulas in mind: Quoting does not make a formula-like cell safe. Review cells before opening the file in spreadsheet software.
Turn pasted table markup into CSV
Paste the table markup above, find the tables and choose the one you want.
Check the repeat count and the grid, then copy or download CSV built from the text of the cells you chose.
Related tools
Frequently Asked Questions
Does this converter fetch a page from a URL?
No. It reads only the markup you paste. There is no address field and no request to another site, so a page behind a login cannot be reached this way.
What happens to merged cells?
A colspan or rowspan is expanded into the slots it covers and the text repeats in each one, so a heading over two columns fills both. The number of repeated cells is printed with the result.
Are table headers detected for me?
Only as a starting default. The option is on when the first row is all th cells and off otherwise, and you can switch it either way, because the cell tag alone is not a reliable signal.
Can I convert more than one table?
One table per run. Tables that sit inside another table are not listed, so paste an inner table on its own if that is the one you need.