Private data converter
HTML to CSV Converter
Convert HTML tables into clean CSV files. Paste HTML source code or upload an HTML file, select a table, and export spreadsheet-ready CSV. Free, private, and processed in your browser.
Convert HTML Tables to CSV Online
HTML Input
CSV Output
Paste HTML or upload a file to detect tables.
Formula protection adds an apostrophe before values starting with =, +, -, or @, including after leading spaces. It can change the original text and is not guaranteed for every spreadsheet app. Relative links are kept as written, without adding a website address.
Your HTML never leaves this tab
Your HTML is parsed and converted locally in your browser.
Processed locally
Your HTML file is read and converted right here in this browser tab.
No account required
No account, email address, or payment details required.
Tables extracted locally
Tables, merged cells, and CSV options are handled in this tab before you copy or download the file.
How to Convert HTML to CSV
Paste HTML or upload a saved HTML file, then choose a table to export as CSV. Website URLs aren’t supported. Working with XML instead? Use the XML to CSV Converter. Already have CSV and need a workbook? Try CSV to Excel.
Paste or upload HTML
Paste a single table, a fragment, or a full HTML document. Or upload a local .html / .htm file. Nested tables are listed separately so you can target the one you need.
Select a table and CSV options
Choose a table, how to handle merged cells, and whether to detect column names automatically or use the first row. Then set the delimiter and encoding.
Copy or download CSV
Check the table or CSV text preview, copy the result, or download a .csv file for Excel, Google Sheets, or other tools.
HTML Table to CSV Example
Each table row becomes one CSV record. Header cells from <th> become column names when header detection is on; body cells become field values. Entities such as & are decoded automatically.
HTML input
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Alice</td>
<td>25</td>
</tr>
</table> CSV output
Name,Age
Alice,25 Convert an HTML File to CSV
Upload a report, email archive page, or other saved .html / .htm file from your computer. The converter reads the file in this tab, finds every <table>, and lets you export one table at a time as CSV.
Local .html or .htm
Use Upload HTML for files up to 10 MB. View-source copy-paste works the same way when you only need part of a page.
Several tables in one file
Use the table sizes and titles to find the data you need. You can skip tables used for page layout or select a table inside another table.
No server upload
The file stays in the browser. Nothing is posted to xlsxtocsv.net for conversion, and this page does not fetch a remote webpage URL for you.
After you have CSV
Open the download in a spreadsheet, or continue with CSV to Excel, CSV to JSON, or CSV to XML if the next step needs another format.
Convert HTML Tables with Rowspan and Colspan
When a cell spans multiple rows or columns, CSV still needs a fixed number of columns on every row. This converter expands merges into a rectangle first, then writes CSV so Product and Price stay in the same columns on every line.
HTML (rowspan)
<table>
<tr>
<th>Category</th>
<th>Product</th>
<th>Price</th>
</tr>
<tr>
<td rowspan="2">Electronics</td>
<td>Keyboard</td>
<td>$50</td>
</tr>
<tr>
<td>Mouse</td>
<td>$25</td>
</tr>
</table> CSV (default blank fill)
Category,Product,Price
Electronics,Keyboard,$50
,Mouse,$25 Default fill keeps the value once and leaves other covered cells blank. Choose repeat merged values if you want Electronics on every related row for filtering or pivots. Colspan is expanded the same way across columns.
HTML to CSV Conversion Options
These controls change how tables become columns and how the downloaded file behaves in Excel or other apps. They do not change your original HTML.
Table selector
When a file has several tables, use their numbers, sizes, and titles to choose the one you need. Switch tables and convert again without re-pasting the HTML.
Headers and merged cells
Auto detect uses <thead> or a first row of <th> cells when present. Merged cells expand with blank or repeated fill so columns stay aligned.
Delimiter and links
Comma fits most tools; semicolon helps in locales where Excel treats comma as a decimal mark. Turn on link export to include link addresses alongside link text. Relative links are kept as written, without adding a website address.
Encoding and Excel safety
Prefer UTF-8 with BOM when people double-click CSV in Excel on Windows. Formula-risk protection is off by default because it can change cell text. The CSV encoding guide explains BOM and delimiters in more detail.
HTML Tables vs CSV Files
HTML tables describe how cells appear on a page, including merges and markup inside cells. CSV is a flat row-and-column text file meant for spreadsheets and imports. Converting keeps the grid of values and drops presentation-only markup.
HTML tables
- Rows,
<th>headers, and optional rowspan/colspan - May sit inside a full document with scripts and layout tables
- Cell content can include links, line breaks, and entities
- Good for saved pages, reports, and copied table source
CSV
- One record per line and one field per column
- Delimiter, header row, and UTF-8 encoding you choose
- Opens cleanly in Excel, Google Sheets, and many importers
- No live layout, styling, or embedded scripts
Frequently Asked Questions
How do I convert an HTML table to CSV?
Paste HTML that contains a <table>, or upload a local .html or .htm file. If several tables are found, pick one in the table selector. Set header detection, delimiter, and encoding, then convert. Check the table or CSV text preview and copy or download the file for Excel, Google Sheets, or another tool that accepts CSV.
Can I convert an HTML file to CSV online for free?
Yes. This free HTML to CSV converter needs no account. Upload a saved .html or .htm file from your computer, choose a detected table, and download CSV. Conversion runs in your browser, so the file is not uploaded to our servers. This tool does not open a live webpage URL for you.
Can I extract multiple HTML tables from one file?
Yes. Tables are listed in the order they appear in your HTML, with approximate row and column counts and a title when available. Choose a table, convert it, then select another if needed. Each table is downloaded separately.
How are rowspan and colspan handled when converting HTML to CSV?
Merged cells are expanded into a full rectangle so later columns do not shift left. By default the value stays in the first covered cell and other covered positions stay blank. Choose repeat if every covered cell should carry the same text—for example when you will filter or pivot on a category column in a spreadsheet.
Can I download HTML table data as CSV for Excel?
Yes. Prefer UTF-8 with BOM when people double-click the file in Excel on Windows. Match the delimiter to regional Excel settings if commas are used as decimal marks. Turn on formula-risk protection only when cell text might start with =, +, -, or @ (including after leading spaces); that option can change the original text. For a native .xlsx workbook from CSV afterward, use the CSV to Excel converter.
Is my HTML file uploaded to a server?
No. Parsing, table detection, and CSV generation stay in this browser tab. HTML source, file names, and cell values are not sent to xlsxtocsv.net or analytics services. There is no “load from URL” on this page, so remote sites are not contacted to fetch HTML for you.
Related Data Converters
Ready to turn HTML tables into CSV?
Paste HTML or choose a file and convert tables locally in your browser.