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
- The HTML Table to CSV & JSON tool
- A web page with a table, or the sample sales report from the Try it button
Steps
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.
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".
See how merged cells are laid out
RegionandTotalspan two header rows, andQ3 2026spans two columns. In the CSV every row has exactly four cells, so values stay in their own columns. With Repeat merged cells ticked,Westappears on both rows it covers.Region,Q3 2026,Q3 2026,Total Region,Desk lamps,Chairs,Total North,"1,250",310,"1,560"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.
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 as310become numbers.
Try it yourself
Opens the HTML Table to CSV & JSON with this tutorial's sample loaded.
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.