Give me your non-semantic tables, your SPANs within LIs,
Your huddled DIVs yearning to align.
The wretched tags of your teeming site.
Send these, the unpastable, tempest-tost to mine.
I lift your golden cells to delight! 1

Copy ANY HTML table into a spreadsheet

Many websites display data in the form of tables without using the explicit <table> tag. Any set of fixed-width elements (<div>, <span>, <li>, etc) positioned next to each other look like a table row, and many such rows stacked vertically look like a table. This has become increasingly common, perhaps because it is more flexible than the HTML table tag.

These tables can't be copied and pasted into a spreadsheet. This tool is clever enough to recognise the structure of a table in a snippet of HTML without having to rely on specific tags names nested in a specific hierarchy.

Paste your HTML below and press "Convert"

Example

Binance use nested DIVs for their order book tables, so copy and paste into spreadsheets doesn't work. Instead, copy the HTML and use this too to convert it:

How it works

The algorithm finds any sequence of repeated tags and flags them as possible rows. If those rows contain repeated tags, they are considered cells and the table is extracted.

Alternative method

Select and copy the table from the website, then use the "Paste as text" function to paste it into a spreadsheet, starting at A1. If you're lucky, the table will paste as a single column of text. Now you can use the formula below to transpose that column into a table. Start by pasting the formula into C1, replacing XXX with the number of columns in the table. Now copy C1 to cells below and to the right to match the expected size of the table.

      
      =OFFSET($A$1,COLUMNS($A1:A1)-1+(ROWS($1:1)-1)*XXX,0)
      

Example:

See here for further info