Skip to main content

HTML Table ⇄ CSV

Convert an HTML table into CSV, or turn CSV into a clean HTML table.

HTML Table ⇄ CSV
Paste an HTML table...

Includes a rendered preview and a header row toggle. Runs in your browser.

Paste the HTML of a table and get CSV you can open in a spreadsheet, or paste CSV and get table markup you can drop into a page. A rendered preview shows what the markup produces, and the first row can be treated as a header.

HTML Table ⇄ CSV: Features

Getting a table off a web page

Copying a rendered table and pasting it into a spreadsheet often works badly: merged cells collapse, formatting comes along, and hidden columns appear. Taking the markup instead is more reliable. Open your browser developer tools, find the table element, copy its outer HTML, and paste it here. What comes back is plain CSV with the cell contents and nothing else.

Generating markup from data

The other direction turns a CSV export into a table you can paste into a page, a wiki or an email template. With the header option enabled the first row becomes a proper thead with th cells, which matters for accessibility: screen readers use the header row to announce which column a value belongs to, and a table built entirely from td cells gives them nothing to work with.

The markup is sanitised before preview

The preview renders the table so you can see the result rather than reading markup, and the HTML is stripped of anything executable before it is displayed. That is necessary because the input is frequently copied from a page you do not control. It also means the preview shows structure rather than the original page's styling, which is usually what you want when checking that the rows and columns came out right.

What does not survive the conversion

CSV is a flat grid, so anything a table expresses beyond rows and columns is lost. Cells spanning several columns or rows are the main casualty: the value appears once and the grid no longer lines up the way it looked. Nested tables, links, images and formatting all reduce to their text. Check the row and column alignment of the output whenever the source table used spans.

Tables containing customer data stay local

Parsing, conversion and preview all run in your browser, so nothing you paste is transmitted, stored or logged. Tables from internal dashboards, reports containing customer data and extracts from a system you are debugging can all be converted here. For CSV that needs a different delimiter, the CSV converter handles semicolons and tabs as well.

HTML Table ⇄ CSV: FAQ

Can I open the result directly in Excel or Google Sheets?

Yes. Save the CSV output as a .csv file and open it, or paste the text straight into a sheet and use its text-to-columns feature with comma as the separator. If your locale's spreadsheet expects semicolons, the CSV converter can produce that instead.

Why does my HTML input report that no table was found?

Because the markup you pasted does not contain a table element. Copying an inner part such as a tbody, or copying a grid built from div elements with CSS rather than a real table, both produce this. A CSS grid has no table structure to extract, and needs a different approach.

Does it handle multiple tables in one input?

The first table in the markup is converted. Paste one table at a time if your source contains several, which also makes it easier to confirm you extracted the one you meant.

Are non-Latin characters handled?

Yes. Cell contents are treated as text regardless of script, so Japanese, Chinese, Cyrillic and accented characters all convert. If a spreadsheet later shows them incorrectly, the cause is the file encoding it assumed rather than the conversion; saving as UTF-8 and importing explicitly resolves it.

How to Use HTML Table ⇄ CSV

  1. HTML to CSV, or CSV to HTML

    Select HTML to CSV to extract a table, or CSV to HTML to generate markup. Press Sample to see the expected input shape for the current direction.

  2. Paste the table markup or the CSV

    For HTML, paste markup containing a table element, copied from your browser developer tools. For CSV, paste the rows, and decide whether the first one should become a header.

  3. Check the preview, then copy

    The rendered preview shows how the table actually comes out, which is the quickest way to spot a column that has shifted because of a merged cell. Copy the output when it looks right.

Category Utilities