Paste HTML, a page's source code or a table copied straight from a web page. Every <table> is detected, you pick the one you need, check it in the preview grid and export it as CSV, TSV or JSON. Merged cells (colspan and rowspan) are expanded correctly.
Last updated:
Tip: copy a table from any web page and paste it here; the HTML behind it is captured automatically.
Tables found
Preview
Advertisement
Advertisement
How to use the HTML Table to CSV
Get the HTML. Copy a table from a web page and paste it, or open the page source (Ctrl+U / Cmd+Option+U), copy everything and paste it. You can also upload a saved .html file.
Pick the table. Every table found is listed with its size and caption. Click one to select it.
Check the preview grid and adjust the options: merged cells, header row, footnote marks and line breaks.
Choose CSV, TSV or JSON as the output format.
Copy or download the result. The CSV opens directly in Excel, Google Sheets or Numbers.
How merged cells are converted
HTML tables can merge cells across columns (colspan) and rows (rowspan), but CSV is a strict grid where every row has the same number of fields. The converter lays the table out exactly as a browser does, cell by cell, skipping positions already taken by a rowspan from above, and then fills each covered position.
HTML
Repeat value (default)
Leave blank
<td colspan="2">Total</td>
Total,Total
Total,
<td rowspan="2">India</td> over two rows
India in both rows
India in the first row only
When a table has several header rows, for example a "Population" heading spanning "2015" and "2023", they are combined into one header row ("Population 2015", "Population 2023") so every column keeps a meaningful name in CSV and JSON.
CSV rules used
Fields that contain the delimiter, a double quote or a line break are wrapped in double quotes, and quotes inside are doubled ("He said ""hi"""), following RFC 4180.
Rows end with CRLF line breaks, which every spreadsheet program reads correctly.
The download starts with a UTF-8 byte order mark when Excel BOM is on, so Excel shows accented letters and symbols correctly instead of garbled characters.
In TSV output, tabs and line breaks inside cells are replaced with spaces, because TSV has no quoting.
Getting tables out of web pages
The quickest route is to select the table in your browser, copy it and paste it here: browsers put the table's HTML on the clipboard, and the tool uses it automatically. For very large tables or pages where selecting is awkward, open the page source (Ctrl+U on Windows and Linux, Cmd+Option+U on a Mac), select all and paste. If the source contains no <table>, the site builds its grid with JavaScript or <div> elements; use the browser's developer tools (right-click the table, Inspect, then copy the element's outer HTML) instead.
Frequently asked questions
How do I convert a table on a website to CSV?
Select the table on the page, copy it and paste it into the input box: the tool captures the HTML behind the copied table. If that does not work, open the page source with Ctrl+U (Cmd+Option+U on a Mac), copy all of it and paste it. Then pick the table and download the CSV.
How are colspan and rowspan handled?
Merged cells are expanded into a regular grid so every row has the same number of columns. By default the merged value is repeated in every cell it covers, which keeps filters and pivot tables working. Choose Leave blank to put the value only in the first cell.
Why is my table not found?
The tool reads <table> elements. Some sites build tables from <div> elements or load the data with JavaScript after the page opens, so the data is not in the page source. In that case copy the visible table from the page, or use the site's own export option.
Should I use CSV or TSV?
CSV with commas is the most widely supported format. Use semicolons if your Excel uses a comma as the decimal separator (common in Europe). TSV (tab-separated) is the safest for pasting straight into a spreadsheet and avoids quoting problems when cells contain commas.
What does the JSON output look like?
With Use first row as header on, the result is an array of objects whose keys come from the header row, for example [{"Country": "France", "Population": 68000000}]. With it off, you get an array of arrays.
Is the HTML uploaded or fetched?
No. The HTML is parsed by your browser with DOMParser, which does not run scripts or load images, and the conversion happens on your device.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.