HTML Table to CSV & JSON · Tutorial

How to copy a web table with merged cells into a spreadsheet

6 min readintermediateUpdated

You copied a report table from a web page into a spreadsheet and the columns came out shifted, because some cells span several rows or columns. This tutorial converts the table with the HTML Table to CSV tool, which lays merged cells out on a proper grid, then exports it for a spreadsheet or for code.

What you need

Steps

  1. Copy the table from the page

    Select the table on the web page and copy it, then paste it into the left box. The tool uses the HTML that your browser copied along with the text. The sample is a regional sales report with a grouped "Q3 2026" heading above two product columns.

  2. Pick the table

    The message says 1 table found. Converted 7 rows × 4 columns. If you paste a whole page with several tables, choose the one you want in the Table menu, which shows each caption, such as "Units sold by region".

  3. See how merged cells are laid out

    Region and Total span two header rows, and Q3 2026 spans two columns. In the CSV every row has exactly four cells, so values stay in their own columns. With Repeat merged cells ticked, West appears on both rows it covers.

    Region,Q3 2026,Q3 2026,Total
    Region,Desk lamps,Chairs,Total
    North,"1,250",310,"1,560"
  4. Export for a spreadsheet

    Choose TSV (for spreadsheets) in Output, press Copy and paste into Excel or Google Sheets. Each value lands in its own cell. Delete one of the two header rows in the sheet if you only want one.

  5. Export for code as JSON

    Choose JSON. With Header row as keys ticked, the two header rows are combined into keys such as "Q3 2026 Desk lamps". Values with thousands separators, like "1,250", stay as text; plain numbers such as 310 become numbers.

Try it yourself

Opens the HTML Table to CSV & JSON with this tutorial's sample loaded.

Try it now

Common mistakes

Pasting into the wrong place
Paste into the input box of this tool, not into a spreadsheet first. Spreadsheets often lose the merged-cell structure when they receive pasted web content.
Turning off Repeat merged cells for analysis
Without repeated values, rows like West's second line have an empty Region, and filters and pivot tables treat them as a separate group. Keep it on when you plan to sort or summarise.
Expecting the page to be fetched from a link
The tool cannot load a page from its address. Copy the table, or save the page and open the file.

Next steps

Go back to the HTML Table to CSV & JSON, or keep going with one of these:

FAQ

What happens to a note that spans the whole row?

It is repeated across the columns it covers, or placed in the first one when Repeat merged cells is off.

Can I convert several tables at once?

Pick them one at a time in the Table menu and copy or download each.