Skip to content
ZeroServer.tools

HTML Table to CSV Converter

Paste HTML <table> markup and get clean, RFC-4180 CSV — runs entirely in your browser.

Delimiter
or drop a file here

Preview

NameRoleCity
Ada LovelaceEngineerLondon
Grace HopperAdmiralNew York
Turing, AlanResearcherCambridge

How HTML table to CSV conversion works

The converter scans your markup for the first <table> element using a lightweight regex tokenizer — no browser DOM parser is used, so it works the same on every device. It walks each <tr> row in document order and reads cell text from both <th> and <td> tags, stripping inline markup like <span> or <br> and decoding common HTML entities (&amp;, &nbsp;, and friends).

Output follows RFC 4180: any field containing the chosen delimiter, a double quote, or a line break is wrapped in quotes with internal quotes doubled (for example Turing, Alan becomes "Turing, Alan"). Rows with a different number of cells than the widest row are padded with empty fields so every line has the same column count. Choose comma, semicolon, tab, or pipe as the delimiter to match the spreadsheet or database tool you're importing into.

Everything happens locally in your browser — nothing you paste is ever uploaded. For the reverse conversion, see CSV to HTML Table Converter. To turn a table into structured JSON instead, try HTML Table to JSON.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Getting a table off a page and into a spreadsheet.
  • Extracting a reference table from documentation for analysis.
  • Converting a report table into a file you can filter.
  • Producing a CSV from a saved page's table.
  • Turning a rendered table back into data for a diff.

Frequently Asked Questions

How are commas and quotes in cells handled?
By RFC 4180 quoting: a value containing a comma, a quote or a line break is wrapped in double quotes and its own quotes are doubled. Without that, one address cell silently splits a row into two columns.
Which delimiter should I choose?
Comma for most tools. Semicolons are the safer choice for European Excel, which uses them when the locale's decimal separator is a comma — otherwise every decimal number breaks the column alignment.
Why does Excel mangle my accented characters?
Because it assumes the local ANSI codepage unless the file starts with a UTF-8 byte-order mark. Either add the BOM or use Excel's text import, which lets you name the encoding explicitly.
Will Excel change my data?
It may. Anything shaped like a date is reformatted, long digit strings become scientific notation, and leading zeros are stripped. This is a spreadsheet behaviour, not a conversion fault — import as text to avoid it.
Is the header row included?
Yes, as the first line, which is what nearly every consumer expects. Drop it manually if you are appending to an existing file that already has one.
What about nested tables?
A table inside a cell has no CSV equivalent — the format is strictly two-dimensional. The inner table's text is flattened into the cell, so check the result if your source nests tables for layout.

Common errors and gotchas

  • Failing to quote values that contain commas, which breaks the column alignment.
  • Losing merged cells, which CSV cannot represent and which shift every column after them.
  • Assuming header cells are marked up as headers, when many tables use styled data cells instead.
  • Letting a spreadsheet reinterpret the values, turning codes into dates and ids into scientific notation.
  • Converting a layout table and getting a grid of unrelated fragments.

Related Converters tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate