WebToolsPlanet
Converter Tools

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

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What 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

1

Paste HTML into the input area or click "Load Sample"

2

Choose which table to extract: First Table, or All Tables

3

Choose quoting mode: Minimal or Always Quote

4

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.

HTML with table
<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>
CSV output
Name,City,Role
Alice,London,Engineer
Bob,Paris,Designer

Privacy

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.