HTML to CSV Converter
Paste HTML containing a table and extract the data as CSV instantly. Choose which table to extract, pick your quoting style, and download or copy the result.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML to CSV Converter?
HTML tables are one of the most common ways data is presented on the web — financial data, product listings, schedules, statistics. Extracting that data for use in a spreadsheet or data pipeline normally requires copy-pasting row by row, or writing a scraping script.
This tool parses the HTML, finds all `<table>` elements, and converts the cell content to CSV rows. It handles `<thead>`, `<tbody>`, `<th>`, and `<td>` cells correctly. When there are multiple tables in the HTML, you can extract the first table, a specific table by index, or all tables separated by blank lines.
How to Use HTML to CSV Converter
Paste HTML into the input area or click "Load Sample"
Choose which table to extract: First Table, or All Tables
Choose quoting mode: Minimal or Always Quote
Copy the CSV output or download it as a .csv file
Common Use Cases
- Analysts extracting data tables from web pages into Excel or Google Sheets.
- Developers converting HTML report tables to CSV for further data processing.
- Data engineers extracting tabular data from HTML email reports.
- Teams converting HTML documentation tables to CSV for import into databases.
- Researchers scraping structured data from HTML pages saved locally.
- Developers converting HTML tables from legacy CMS exports to CSV for migration.
Example Input and Output
An HTML table with a header row and data rows is extracted as CSV.
<table>
<thead>
<tr><th>Name</th><th>City</th><th>Role</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>London</td><td>Engineer</td></tr>
<tr><td>Bob</td><td>Paris</td><td>Designer</td></tr>
</tbody>
</table>Name,City,Role
Alice,London,Engineer
Bob,Paris,DesignerPrivacy
All HTML parsing and CSV conversion runs in your browser. No data is uploaded to any server.
Tip: extracting from web pages
To extract a table from a live web page: right-click the table in your browser → "Inspect" → navigate to the <table> element → right-click → "Copy element". Paste the copied HTML here and extract the data.
Frequently Asked Questions
What if the HTML has multiple tables?
Use the "Table" selector to choose which table to extract: "First Table" extracts table[0], or select "All Tables" to get every table's data separated by blank lines. The stats bar shows how many tables were found.
Are <th> header cells included in the output?
Yes. All cells — both <th> (header cells) and <td> (data cells) — are included in the CSV output. The extractor reads every row in the table including thead rows.
What about merged cells (colspan/rowspan)?
The extractor reads the visible text content of each cell. Merged cells (colspan/rowspan) may produce irregular row lengths or empty cells in the output. For complex merged tables, manual cleanup may be needed.
Is my HTML sent to a server?
No. All parsing and extraction runs in your browser using DOMParser. Your HTML never leaves your device.
Related Tools
CSV to HTML Table Converter
Convert CSV or TSV data into a clean HTML table with border, striped rows, and responsive wrapper options.
HTML to JSON Converter
Convert HTML tables, lists, or DOM trees to JSON. Extracts structured data from HTML without writing a parser.
TSV to CSV Converter
Convert tab-separated values (TSV) to comma-separated values (CSV) — pick the output delimiter, control quoting, and decode \t \n \r escape sequences.
XML to CSV Converter
Convert XML to CSV online. Flattens repeated XML elements into rows and columns with configurable quoting and header options.
JSON to CSV Converter
Convert a JSON array of objects to CSV. Flattens nested objects with dot-notation columns and handles arrays within values.
CSV Viewer
View, search, and sort CSV data as an interactive table. Supports comma, semicolon, tab, and pipe delimiters.

