HTML table to CSV Converter
Paste a web page's source or just a <table> and get CSV: every table is found, colspan and rowspan are expanded into a regular grid, and tags inside cells are flattened to text.
HTML table to CSV Converter
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Add your HTML table
Paste it into the left box, press Open file, or drag a .html file onto it. Sample loads a realistic example.
Set the options
Adjust the options above the boxes — the output updates instantly as you change them.
Check the result
Read the status line: it reports rows, keys and any value that couldn't be represented in CSV.
Copy or download
Copy the CSV or download it as a .csv file. Nothing was uploaded at any point.
Script-rendered table? Copy it from developer tools with Copy outerHTML — View Source won't contain it.
Features
Pick any table
When the page has several tables, choose which one to convert by number.
Header row or not
Use the first row as field names, or treat every row as data with generated column1, column2… names.
Any output delimiter
Comma for most tools, semicolon for European Excel, tab or pipe when your data is full of commas.
Opens cleanly in Excel
Add a UTF-8 byte-order mark so Excel on Windows shows accents, ₹, € and emoji correctly instead of mojibake.
Quoting control
Quote only the fields that need it (RFC 4180 minimal) or every field for strict importers.
Private by design
Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.
About the HTML table to CSV Converter
Copying a table from a web page into a spreadsheet often goes wrong — merged cells shift columns, footnote links leak in, or the paste lands in one column. Working from the HTML is more reliable. Paste a full page source (View Source, or the Elements panel's Copy outerHTML) or just the <table> element.
Your browser's HTML parser reads the markup, so even sloppy HTML with unclosed tags parses the way a browser would display it. Each table becomes a grid: colspan="2" repeats the value across two columns and rowspan="2" repeats it down two rows, so every row has the same number of fields and nothing shifts. Cell text is taken from all nested elements (links, spans, bold), with whitespace collapsed. Rows from nested tables are kept with their own table.
When the page has several tables, the status line shows how many were found and the Table # box picks one. The CSV follows RFC 4180, ready for Excel, Sheets or a database.
Examples
A timetable with a merged header cell and a lunch break spanning two rows.
<table>
<tr><th>Time</th><th colspan="2">Room A</th></tr>
<tr><td>09:00</td><td>Data formats</td><td rowspan="2">Lab</td></tr>
<tr><td>10:00</td><td><a href="/csv">CSV deep dive</a><sup>[1]</sup></td></tr>
<tr><td>11:00</td><td colspan="2">Break</td></tr>
</table>Time,Room A,Room A
09:00,Data formats,Lab
10:00,CSV deep dive[1],Lab
11:00,Break,BreakThis output was produced by the converter on this page with the default options — load it with the “Timetable” preset above and change any option to see the effect.
How HTML table maps to CSV
| In HTML table | Becomes in CSV |
|---|---|
<th> / <td> | a field |
colspan="3" | value repeated across 3 columns |
rowspan="2" | value repeated in the next row |
<a>Pune</a><sup>[1]</sup> | Pune[1] |
| Line breaks and extra spaces | collapsed to single spaces |
Several <table>s | choose with Table # |
Things that trip people up
- Tables built with JavaScript. If the table is rendered by scripts, View Source won't contain it. Copy the element from your browser's developer tools (right-click → Copy → Copy outerHTML) instead.
- Layout tables. Old sites use tables for layout; skip them with Table # until the preview shows your data.
- Footnote markers. Superscript references like [1] are part of the cell text. Remove them in the spreadsheet with find-and-replace on \[\d+\].
- Images and icons. Only text is extracted; an image-only cell (a flag, a tick icon) comes out empty.
HTML table vs CSV at a glance
| Property | HTML table | CSV |
|---|---|---|
| Specification | HTML Living Standard (WHATWG) | RFC 4180 (2005) |
| File extension | .html | .csv |
| Media type | text/html | text/csv |
| Data types | text (any inline HTML) | text only — every cell is a string |
| Comments | Yes <!-- --> | No |
| Nesting | Cells can span rows/columns | None (flat rows) |
- HTML table: Use
for header cells and a so screen readers can announce the table properly. - CSV: Fields containing a comma, a double quote or a line break must be wrapped in double quotes, and a quote inside is written twice ("").
Frequently asked questions
5 answersHow do I extract a table from a website to CSV?
Copy the page source or the table's HTML (developer tools → Copy outerHTML), paste it here and download the CSV.Are merged cells handled?
Yes. colspan and rowspan are expanded by repeating the value, so every CSV row has the same number of columns.What if the page has many tables?
All of them are found; the status line shows how many, and Table # chooses which one to convert.Does it fetch the URL for me?
No — this tool works offline on HTML you paste, so nothing is requested from other sites. Copy the HTML from your browser.Is my data uploaded anywhere?
No. The HTML table is parsed and converted by JavaScript in your browser tab; nothing is sent to a server, so it is safe for internal exports, customer lists and configuration files with secrets.esc↑↓ navigate↵ openesc closeMy deck
Stored only in this browser.