araç köşesi

HTML Table to CSV

Turn HTML table markup into CSV and open it in Excel

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

Paste HTML code containing a <table> tag into the left pane. To find the code, right-click an empty spot on the page that shows the table, choose "View page source" (Ctrl+U also opens it), locate the table and copy everything from <table> to </table> — pasting the whole page source works too, because the tool finds the tables itself and reports how many it found in the result line. On a page with three tables where the price list is the second one, typing 2 into the table field is all it takes. Merged cells are expanded automatically: a heading spanning two columns becomes two CSV cells, and with the default setting the value is written into both — that is what keeps filters and pivot tables working in Excel. Keep the comma separator for US/UK Excel and most software; switch to semicolon for Excel in locales that use a decimal comma. The result line tells you how many rows, columns and merged cells came out; the Download button saves table.csv.

This tool is also known as html table to csv, convert html table to csv, html table to excel, extract table from html, html to csv converter, table scraper online.

What is HTML table (the table tag)?

An HTML table is the markup structure that carries row-and-column data on a web page: the <table> container holds rows (<tr>), and rows hold header (<th>) and data (<td>) cells. Cells can stretch across several columns or rows with the colspan and rowspan attributes, and helper tags like thead, tbody and caption organise the sections. However styled the table looks on screen, underneath it is plain text code — and that code is what this tool reads to extract the data.

What is CSV?

CSV (comma-separated values) is the most widespread plain-text format for exchanging table data: each line is one record, and cells are split by a separator character. Despite the name, the separator varies by region — much of Europe uses semicolons because the comma serves as the decimal mark there. A cell containing the separator, a quote or a line break is wrapped in double quotes, with inner quotes doubled. CSV knows no formatting, no formulas and no merged cells; the only thing it carries is data.

What is the difference between an HTML table and CSV?

Both carry rows and columns, but for different purposes. An HTML table exists to be displayed: it supports merged cells, nesting, links and styling — richness that makes it awkward for any program that isn't a browser. CSV exists to be transferred: a single flat layer, no formatting, every row with the same number of cells, readable by everything from Excel to a database. This converter performs exactly that translation — it discards HTML's visual richness, expands colspan and rowspan into a grid, and leaves behind bare data any program can process.

The merged-cell and nested-table traps

An HTML cell can swallow its neighbours sideways with colspan and downwards with rowspan; CSV, by contrast, demands the same number of cells in every row. This tool bridges the gap by building a grid: every covered position becomes a real CSV cell. The default setting repeats the value into every expanded cell, because Excel's filters and pivot tables treat an empty cell as "no data" and drop the row from its category. If you care about the visual layout instead, the "leave empty" option keeps the value in the first cell only. Either way, the merged-cell count in the result line tells you how many cells were involved.

A nested table cannot be expressed in CSV at all, because CSV has a single layer. When the tool meets one, it folds the inner table's text into the cell that contains it, joined with spaces — no data is lost, but the inner rows flatten. If the inner table is the data you actually want, copy just that table from the source and paste it on its own; the tool will then treat it as a top-level table.

Which separator for which destination?

There is no single CSV standard; the program that will open the file decides the separator.

  • Comma → standard CSV: programming libraries, database imports and Excel with US/UK regional settings
  • Semicolon → Excel in locales with a decimal comma (most of Europe): there the comma is taken, so Excel expects semicolons
  • Tab → copy the output and paste it straight into Excel or Google Sheets; also the safest pick when cell texts are full of commas
  • Not sure → download with a comma and open it; if everything lands in one column, download the same data with a semicolon

Frequently asked questions

I selected the table on screen and copied it — why wasn't it recognised?

Copying from the screen takes the table's visible text, not its HTML code, and this tool looks for a <table> tag. Right-click an empty spot on the page, choose "View page source", select all with Ctrl+A and paste the whole thing here — the tool locates the tables on its own. Worth knowing: a table copied from the screen usually sits on the clipboard as tab-separated text and can be pasted straight into Excel anyway.

The page has several tables; how do I pick mine?

Paste the code as it is and convert: the result line reports how many tables were found and which one was converted. If the wrong one came out, raise the number in the table field and look again — tables are numbered from 1 in the order they appear in the code. Enter a number beyond the count and the tool answers with how many tables actually exist.

Why is the same value repeated across neighbouring cells?

Because the default setting writes a merged cell's value into every position it covers. Sorting, filtering and pivot tables in Excel want each row to carry its own value; an empty cell leaves that row without a category. If looks matter more than analysis, switch to "leave empty" — the value then stays in the top-left cell and the covered cells come out blank.

What if Excel shows accented characters incorrectly?

The downloaded file is UTF-8, which current Excel versions read directly. If an older version mangles accented or non-Latin characters, don't double-click the file: use Data → "From Text/CSV" inside Excel and pick UTF-8 as the file origin — the characters come through intact.