Convert HTML to CSV
Extract any table
from any page.
Free HTML table to CSV converter. Upload an HTML file or paste HTML directly — all tables detected automatically with row counts. Handles colspan, rowspan and nested tags. Runs entirely in your browser.
How HTML to CSV conversion works
Browser-native DOMParser — no regex, correct handling of complex table structures.
HTML parsed by DOMParser
CSVShift uses the browser's native DOMParser to parse the HTML into a full DOM — the same engine that renders web pages. This correctly handles malformed HTML, nested elements, <thead>, <tbody> and <tfoot> sections.
colspan and rowspan resolved
A sparse grid algorithm maps each cell to its correct row and column position, accounting for colspan and rowspan attributes. Merged cells are expanded — the top-left value is placed in the primary cell, adjacent cells are filled with empty strings to maintain column alignment.
Inner HTML stripped, CSV exported
<br> tags are replaced with spaces, then all remaining HTML tags are stripped using textContent — leaving only clean text values. The result is serialised as RFC 4180 CSV with UTF-8 BOM encoding.
HTML table to CSV — Python code examples
For automated scraping and pipeline workflows.
When do you need HTML to CSV?
Common situations where extracting a table from HTML is necessary.
Web scraping without code
Save a web page as HTML (Ctrl+S in your browser), upload it here, and extract any table as CSV — without writing a single line of Python or JavaScript. Useful for one-off data extractions from Wikipedia, government data sites or financial pages.
Email table extraction
HTML emails often contain data tables — order summaries, event schedules, price lists. Save the email as HTML from your mail client and upload it here to extract the table as a spreadsheet-ready CSV.
CMS and report exports
CRMs, ERPs and reporting tools often export data as HTML pages rather than CSV. Uploading the HTML export and extracting the table produces a CSV that works in any spreadsheet or database import tool.
Copy from browser
Select any table on a web page, right-click → View Page Source, copy the relevant HTML section, and paste it into CSVShift. The table selector handles multiple tables on the page — choose the one you need.
Related CSV tools
Other free converters on CSVShift you might need.
HTML parsed natively
in your browser. No server.
CSVShift uses the browser's built-in DOMParser API to parse HTML — the same engine that renders web pages. No external library, no server-side processing. Your HTML file and any pasted HTML are parsed locally, never transmitted.
The sparse grid algorithm correctly handles colspan and rowspan — the most common reason other HTML-to-CSV tools produce misaligned columns. Each cell is mapped to its exact grid position, expanding merged cells across columns and rows.
Browser-native DOMParser
colspan / rowspan grid
Multi-table selector
Free, no conditions
How do I convert an HTML table to CSV?
How do I extract a table from a web page?
How do I convert HTML to CSV in Python?
import pandas as pd; tables = pd.read_html('page.html'); tables[0].to_csv('out.csv', index=False). For URLs: pd.read_html('https://site.com/page')[0].to_csv('out.csv'). For more control: BeautifulSoup + csv.writer as shown in the code examples above.