How to Turn HTML Tables Into Excel or CSV Files
Tables on web pages are full of useful data: prices, schedules, results, statistics. Getting them into a spreadsheet by copy and paste often scrambles the layout. Converting the underlying HTML directly gives you clean rows and columns that you can sort, filter and calculate with.
What you need first
You need the table’s HTML code, or an .html file saved from the page. A browser tool cannot fetch other websites for you because of security rules, so the address of a page alone is not enough. Copy the HTML and paste it in, or upload the saved file.
How to get the HTML
- View Source: right-click the page, choose View Page Source and copy the part that contains the table.
- Inspect: right-click the table, choose Inspect, then copy the table element. This is the better route when the table is built by JavaScript after the page loads.
- Save the page: use Save As in your browser and upload the .html file.
Converting step by step
- Paste the HTML or upload the file in HTML Table to Excel.
- Review the list of detected tables and select the ones you want.
- Choose whether numbers should become real Excel numbers.
- Download an .xlsx workbook, with one sheet per table, or a CSV.
What happens to tricky content
| Situation | Result |
|---|---|
| Merged cells | The value goes into the first cell of the merged area and the others stay empty, which keeps data sortable |
| Numbers like 12,450 | Converted to real numbers when the option is on |
| Codes with leading zeros | Kept as text so 00123 stays 00123 |
| Several tables on one page | Each is listed; each selected table gets its own sheet |
| Scripts in the pasted HTML | Never executed |
When no tables are found
The code must contain real table elements. Tables drawn with div elements, or loaded by JavaScript after the page opens, do not appear in View Source. Copy the HTML from the Inspect panel instead. If the data lives in a PDF or an image, use a different route, such as Image to Text for a picture of a table.
Cleaning the result in Excel
- Delete empty helper rows and columns.
- Check that dates were read correctly.
- Remove thousands separators in text columns before using them in formulas.
- Add a header row filter to start sorting and filtering.
A note on permission
Data on a public page is not automatically free to reuse. Check the site’s terms and any licence before you republish or sell data you extracted.
Key terms: HTML table to Excel, HTML to CSV, table converter, web scraping, copy table from website, merged cells, xlsx, Inspect element.
Frequently asked questions
How do I convert an HTML table to Excel?
Paste the HTML or upload the .html file, choose the tables you want and download. Each table becomes one sheet in an .xlsx workbook.
Can I convert a page directly from its web address?
No. A browser tool cannot fetch other sites because of security rules, so paste the page source or upload a saved file.
What happens to merged cells?
The value goes into the first cell of the merged area and the rest stay empty, so the data stays easy to sort and filter.
Why were no tables found?
The code needs real table elements. Tables made with div elements or loaded later by JavaScript may be missing from View Source; copy the HTML from Inspect instead.
Is my HTML sent to a server?
No. Everything runs in your browser, and scripts inside the pasted HTML are never executed.
Have an HTML table you want in a spreadsheet?
Try HTML Table to Excel →Put this guide into practice
HTML Table to Excel — Turn HTML tables into an Excel or CSV file, free.
Excel & CSV Converter — Convert Excel to CSV or JSON, and CSV to Excel, free.