Free HTML table extractor — upload or paste — no server

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.

Your data never leaves your browser
All tables auto-detected
colspan & rowspan handled
Upload file or paste HTML
Always free
HTML Table to CSV  100% client-side
Drop your HTML file here
.html or .htm — all <table> elements detected automatically
or paste HTML directly
Paste HTML containing a table
Select table to export
 Table exported

      
How HTML to CSV conversion works

Browser-native DOMParser — no regex, correct handling of complex table structures.

1
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.

2
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.

3
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.

pandas.read_html() — simplest approach
# From a local file: import pandas as pd tables = pd.read_html('page.html') # returns list of DataFrames tables[0].to_csv('output.csv', index=False) # From a URL (fetches and parses in one step): tables = pd.read_html('https://example.com/data-page') for i, df in enumerate(tables): df.to_csv(f'table_{i}.csv', index=False)
Requires: pip install pandas lxml. pd.read_html() handles colspan/rowspan automatically using lxml's table parser.
BeautifulSoup + csv — more control
from bs4 import BeautifulSoup import csv, requests html = requests.get('https://example.com/page').text soup = BeautifulSoup(html, 'html.parser') table = soup.find('table') # or find_all('table')[1] for 2nd table with open('output.csv', 'w', newline='', encoding='utf-8') as f: writer = csv.writer(f) for row in table.find_all('tr'): cells = [td.get_text(strip=True) for td in row.find_all(['th','td'])] writer.writerow(cells)
Requires: pip install beautifulsoup4 requests. get_text(strip=True) strips HTML tags and whitespace — same as CSVShift's browser-side approach.
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.

Popular searches
html table to csv html to csv converter convert html table to csv html to csv online extract html table to csv html to csv python html table to csv javascript web scraping table to csv copy html table to csv wikipedia table to csv html to csv free parse html table to csv

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
No regex HTML parsing — the actual browser DOM engine handles malformed HTML and nested structures correctly.
colspan / rowspan grid
Sparse grid algorithm maps every cell to its correct position — merged cells don't shift adjacent columns out of alignment.
Multi-table selector
All tables detected with row and column counts — choose exactly which table to export when a page has multiple.
Free, no conditions
No file size limit, no row cap, no watermark. Funded by display advertising only.
Frequently asked questions
Common questions about extracting HTML tables to CSV.
How do I convert an HTML table to CSV?
Upload an HTML file or paste HTML containing a table. CSVShift detects all tables automatically and shows a selector with row counts. Select the table you want, choose your delimiter, and click Export to CSV.
How do I extract a table from a web page?
In your browser, go to the page, press Ctrl+U (or Cmd+U on Mac) to view source, select all (Ctrl+A), copy (Ctrl+C), then paste into CSVShift's paste area. Click Detect tables — CSVShift will find all tables on the page. Select the one you need and export.
How do I convert HTML to CSV in Python?
Simplest: 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.
How are colspan and rowspan cells handled?
CSVShift uses a sparse grid algorithm that tracks which grid positions are occupied by spanning cells. The primary cell (top-left of the span) gets the text value; all other positions in the span are filled with empty strings to maintain correct column alignment throughout the table.
Is my HTML data safe when converting online?
Yes. CSVShift parses the HTML using the browser's native DOMParser entirely locally. Your HTML file and any pasted content are never uploaded to any server. Open the Network inspector during conversion — zero outbound data requests are made.