HTML to TSV

Extract an HTML table as tab-separated values.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

HTML Table to TSV Converter Online

The HTML to TSV converter extracts a table from HTML and turns it into tab-separated values. Paste the source of a web page, an HTML email, or just a <table> fragment, and get clean TSV that you can paste straight into a spreadsheet or feed into command-line tools like cut, awk, or a database COPY.

How it works

The HTML is scanned for <table> elements, and the one you select is read row by row. Each <td> and <th> becomes one field; the fields are joined with tab characters and the rows with line breaks. A preview table below the output shows exactly what was extracted, so you can confirm the right table and header before copying.

Options

  • Table – pick which table to convert when the HTML contains more than one (numbered from the top of the document).
  • Header row – Auto-detect uses <thead> or a row of <th> cells; First row treats the first row as column names even if it uses <td>; No header keeps every row as data.

Cleaning cell content

Real-world tables are full of markup. The converter keeps only the text a reader would see: links, icons, bold and italic tags are removed, HTML entities such as &amp;, &nbsp;, and &euro; are decoded, and line breaks inside cells are collapsed to spaces. colspan and rowspan are laid out on a grid, with empty fields where cells are merged, so the values under each column stay aligned. A stray tab or line break inside a cell is replaced by a space, which guarantees one record per line and a constant number of columns.

Use cases

Copying a pricing, sports, or statistics table from a website into Excel; saving a report table from an internal dashboard; migrating tables from old HTML documentation into a database; or preparing data for a quick analysis in a script.

Prefer commas? Use HTML to CSV. To get structured data instead, try HTML to JSON or HTML to XML. Going the other way, TSV to HTML builds a table from tab-separated data, and TSV to CSV switches delimiters.

Frequently Asked Questions

The first one by default. Choose another in the Table selector: tables are numbered in the order they appear in the HTML, nested tables included. If you pick a number higher than the page has, the last table is used.

With Auto-detect, a row inside <thead> or a first row made only of <th> cells becomes the header. Choose “First row” to force the first row as header, or “No header” to keep all rows as data with generic column names (column1, column2…).

Only the visible text of each cell is kept: tags such as <a>, <strong>, and <em> are removed, entities like &euro; are decoded, and whitespace is collapsed. A cell with colspan is followed by empty cells so the columns stay aligned.

Tab-separated text pastes directly into Excel, Google Sheets, and Numbers, landing each value in its own cell without an import dialog. Tabs rarely appear inside table text, and any that do are replaced by spaces, so the output never needs quoting.