🗃️

HTML Table Extractor

Paste raw HTML source (view-source, "Inspect", or a saved page) and pull out any <table> as clean, copyable data — no more mangled text-select copies.

HTML Source
Extracted Table
Paste HTML on the left and click "Extract Table(s)".

About the HTML Table Extractor

Many websites render tables in a way that makes a plain click-and-drag text selection copy badly — columns collapse into one blob, sticky headers repeat, or CSS grid/flex layouts scramble the row order entirely. This tool sidesteps all of that: paste the page's raw HTML source instead of the rendered text, and it parses every <table> element directly out of the markup, rebuilding rows and columns exactly as the DOM defines them — including merged cells (rowspan/colspan).

Everything runs locally in your browser using the native DOMParser — nothing is uploaded anywhere. Once extracted, copy the result as a rich table (pastes as real columns into Google Sheets, Excel, or Word), or export as CSV, TSV, or a Markdown table for docs and READMEs.

Common Use Cases

How to Use

  1. On the source page, view the HTML — either "View Page Source" (Ctrl/Cmd+U), or open DevTools, right-click the table element, and choose "Copy → Copy outerHTML"
  2. Paste the copied HTML into the input box on the left
  3. Click "Extract Table(s)" — if the HTML contains more than one table, pick which one you want from the list that appears
  4. Use "Copy as Table" to paste real columns/rows into a spreadsheet, or copy CSV / TSV / Markdown for other destinations

Frequently Asked Questions

Why paste HTML instead of just copying the table text directly?

Selecting rendered table text with your mouse copies whatever the browser thinks is "visible," which breaks on sticky headers, virtualized rows, CSS-only layouts, or tables split across multiple DOM elements. Pasting the actual HTML markup lets this tool read the real row/column structure from the <table>, <tr>, <td>, and <th> tags directly, so the result is always accurate.

Does it handle merged cells (rowspan/colspan)?

Yes — merged cells are expanded so every row and column lines up in the final grid, with the merged cell's value repeated across the cells it visually spans. This keeps the extracted CSV/table rectangular and usable in a spreadsheet.

Is it safe to paste HTML from a page I don't fully trust?

Yes. The HTML is parsed with the browser's built-in DOMParser, which never executes scripts or loads remote resources, and only the plain text content of table cells is ever extracted — no raw markup from your paste is injected back into the page.

What if the pasted HTML contains more than one table?

Every <table> found — including tables nested inside other tables — is listed separately with its row/column count so you can pick exactly the one you need.

Advertisement