This html table to csv converter takes pasted HTML and writes one top-level table as CSV text. The parse is DOMParser with text/html. The parsed nodes are not inserted into this page, and the source is not shown as a live table. The output is a textarea of CSV.
Only tables that are not inside another table are offered. If the paste has several of those, the list shows an index and a short preview from the caption or the first row, and you pick one. Tables are not merged. Caption and column-group markup are not cells. Header cells and data cells both become fields, in the row order of table.rows.
Each cell is placed in the next free column. A colspan or rowspan occupies its rectangle. The text is written only in the top-left cell of that rectangle. Every covered position is an empty field. The text is not copied into those positions, because repeating it would invent extra values. If a span overlaps a cell that is already filled, or the span cannot be represented, conversion stops and the previous CSV is cleared.
A cell that contains another table is an error. The inner table is not flattened into the row, and its text is not glued onto the parent. If you need that inner table, paste it as its own top-level table. Cell values are text content, with no extra trimming. Entities are decoded because that is the parser’s text. A link inside a cell contributes the words you can see, not the href.
Quoting matches the JSON to CSV tool. A field that contains a comma, a double quote, or a line break is wrapped in quotes, and a quote inside the field is doubled. Rows are joined with CRLF. Every value stays a string. Numbers are not retyped. A cell that starts with =, +, -, or @ is left unchanged. Spreadsheet software may treat that leading character as a formula. This page does not prefix an apostrophe to “make it safe,” because that would change the data.
Empty input is an error. HTML with no top-level table is an error. A table with no rows, a nested table, a grid wider than 50 columns, or a grid taller than 500 rows is an error, and the CSV box is cleared so an older result does not stay.
A table whose first row is Name and Qty, and whose second row is Ada and 2, becomes two CSV rows. Those words are text, including the digits. A cell colspan="2" with the text Wide puts Wide in the first column and leaves the next column empty on that row. A rowspan="2" puts the text on the first row only. The cell below it in that column is empty.
A cell whose text is hello, world is quoted. A cell that contains a quotation mark doubles that mark inside the quotes. A line break inside a cell stays inside the quoted field, and the next CSV record still starts after CRLF. =SUM(A1:A2), +123, -123, and @something are copied as those characters. The status says a spreadsheet may treat them as formulas.
The CSV is not an HTML preview and it is not a second copy of the page table. When the next step is a JSON array of objects, the JSON to CSV page already reads a header row and keeps every cell a string. This page does not add a header that the HTML did not have. The first row of the table is the first row of the CSV, whether those cells were header cells or data cells.
Copy uses the clipboard when the browser allows it. If it does not, select the CSV and copy it yourself. Clear drops the paste from the page. There is no stored table and no network request.
Converts one top-level HTML table to CSV text. If several tables are present, pick one. A colspan or rowspan writes its text in the first cell and leaves the covered cells empty. A nested table is an error and is not flattened. A link inside a cell contributes its visible text, not its href. Values stay strings. A cell that starts with =, +, -, or @ is kept as written; spreadsheet software may treat it as a formula. Nothing is previewed as HTML. Limit: 200,000 characters, 500 rows, 50 columns.
The text is written once, in the first cell of the span. The covered cells are empty. The text is not repeated across the span.
No. A nested table is an error. Its text is not appended to the parent cell. Paste that inner table by itself if you need its CSV.
No. The cell is the visible text of the link. The href is not written. Use the HTML Link Extractor when you need addresses.
No. The characters stay as they were. Spreadsheet software may still treat a leading equals sign, plus, minus, or at-sign as a formula.