Skip to main content
NyankoTools

HTML Table to CSV Converter

Paste the HTML of a <table> — for example copied from a page's source — and get CSV. Merged cells are expanded, and you can add a BOM so Excel opens non-ASCII text correctly. If you want JSON instead, try the CSV to JSON Converter.

🔒 Runs in your browser · Your data is never sent to a server

Notes

  • If the HTML contains several <table> elements, pick one with "Table to convert". A nested table is treated as a separate table from the one around it.
  • Tags inside cells are stripped and only the text is kept. Runs of whitespace and line breaks collapse into one space, and <br> becomes a space.
  • Merged cells (colspan and rowspan) are expanded. By default the cells they cover are left empty; check "Repeat the value in merged cells" to fill them with the same value.
  • Scripts in the pasted HTML are not executed and images are not loaded.
  • If Excel shows garbled non-ASCII text, turn on "Add a BOM" before downloading.

Glossary

colspan / rowspan

HTML attributes that merge a cell across columns (colspan) or rows (rowspan). CSV has no merged cells, so they are expanded in the output.

BOM

Byte Order Mark, a marker placed at the start of a UTF-8 file. Excel may misread UTF-8 CSV files that lack it.

CSV

Comma-Separated Values, a plain-text table format that separates fields with commas.

FAQ

What should I paste to convert a table on a web page?

In your browser's developer tools, select the table element and use "Copy outerHTML". Anything that contains <table> … </table> works, including the whole page source.

How are merged cells (colspan and rowspan) converted?

CSV has no merged cells, so they are expanded across columns and rows. By default the covered cells are left empty. Check "Repeat the value in merged cells" to fill them with the same value.

Excel shows garbled text when I open the CSV.

Excel can misread UTF-8 CSV files that have no BOM. Turn on "Add a BOM to the download" before downloading. The copied text never includes a BOM.

What happens when the HTML contains more than one table?

The "Table to convert" dropdown lists each table with its row and column count. Only the table you select is converted.

Share this page

↑↓ Select Enter Open Esc Close