Convert HTML Table to CSV / Excel
Paste an HTML table and convert it to CSV or Excel, preserving rows and columns.
HTML tables are one of the most common ways to display structured data on web pages, but they are difficult to export or manipulate outside the browser. This tool converts HTML <table> elements into clean CSV or Excel format, preserving the row and column structure. It parses the header row (<thead> or the first <tr>), data rows (<tbody>), and handles merged cells (colspan and rowspan) by filling appropriate empty values. The converter also generates MediaWiki table markup as an alternative output format, useful for wiki editors and documentation platforms. You paste HTML directly into the text area or load an .html file, select your preferred output format, and the tool produces properly quoted, RFC 4180 compliant CSV. All processing happens locally using the browser DOMParser, which safely parses HTML without executing scripts or fetching external resources. This makes it safe for processing untrusted HTML from any source. The tool handles complex tables with nested elements, inline styles, and multi-line cell content.
How to use the Convert HTML Table to CSV tool
- Load your HTML data: Drag and drop your .html or .htm file, choose a file from your file explorer, or paste HTML content directly into the paste area.
- Configure output settings: Choose a CSV delimiter (comma, semicolon, tab, or pipe) and toggle whether the first row is a header.
- Convert to CSV: Click the "Convert Data" button to parse all <table> elements from the HTML into CSV rows.
- Export results: Copy the results to your clipboard, download as a local file, or export to Excel format.