HTML to CSV converter
Turn the tables on a web page into CSV files. Paste a table you copied, or drop a saved page, and pick the table you want.
Drop an HTML file here
A saved web page (.html, .htm or .mhtml), up to 100 MB. It stays on your computer.
- No sign-up
- No content uploaded
- Every table on the page
Web tables as clean rows.
Your file stays on your computer
The HTML is read and the CSV is written in your browser. Its contents are never sent to Mammoth or anyone else.
No footnote marks in the numbers
Marks such as [1] and hidden text are left out, so 15,292 [14] is written as the number 15292.
Merged cells filled in
A cell that spans two rows fills both, so every row can be sorted and filtered on its own.
How to convert HTML to CSV
Each table on the page becomes a CSV. Its header becomes the first line, and each row of the table becomes a line.
- 1
Add the table
Copy a table from a web page and paste it, or drop a page you saved as .html or .mhtml.
- 2
Pick the table
The largest table opens first. Choose another from the list if the page has more than one.
- 3
Download
Save the table you picked as a CSV, or every table in one .zip file.
Other ways to do it
Python's pandas library reads web tables too, with read_html. The difference is what comes out the other end.
Python with pandas
A script you run yourself
- Footnote marks removedNo
- One header rowNo
- Every table at onceYes
- No code to writeNo
- This page
This converter
A CSV in one step
- Footnote marks removedYes
- One header rowYes
- Every table at onceYes
- No code to writeYes
How to convert HTML to CSV in Python
The pandas library reads every table on a page with read_html, and writes one to a CSV. Here is the whole script.
Want a spreadsheet instead? The HTML to Excel converter puts each table on its own sheet. For a table in a PDF, use the PDF to CSV converter.
import pandas as pd
tables = pd.read_html("page.html")
print(len(tables), "tables")
tables[1].to_csv("table.csv", index=False)Pick the table by its number in the list. A table with a two-row header is written with two header rows, and footnote marks such as [12] stay in the cells.
Your file stays private
The converter runs inside this page. Your HTML is read and turned into CSV on your computer, and its contents are never sent to Mammoth. We record only what kind of data it was, such as a price list, and its common column names, never a value.
Once the page has loaded, it works with your internet switched off.
Copying the same table every week?
Mammoth can take it from there. Save each week's table as a CSV in a folder and Mammoth adds it to one table, ready to filter, total and download.
Weekly rates
| Week 45 | Nov 03 | Euro | 0.8612 | |
| Week 45 | Nov 03 | British pound | 0.7598 | |
| Week 46 | Nov 10 | Euro | 0.8641 | |
| Week 47 | Nov 17 | Euro | 0.8597 | |
| Week 47 | Nov 17 | Japanese yen | 154.21 |
Illustration. Every new file in the folder is added to the same table.