Format Code Now
/
ConvertTSV to HTML Next: TSV to XML ›

TSV to HTML Table Converter

CV-110

Paste tab-separated values and get an HTML table, with the first row as the header unless you turn that off.

Runs in your browser. Nothing is uploaded.

TSV (tab-separated values)

HTML

How to use it

  1. Paste your TSV, or open a .tsv file.
  2. Tick or untick First row is header.
  3. Choose whether quoted fields are allowed, and the indent.
  4. Press TSV to HTML, or Full HTML page for a complete document.

How rows and cells map

Each line becomes a table row and each tab a new cell. The first row becomes a thead with th scope="col" cells; without it every row is a body row. By default a field wrapped in double quotes is read the way Excel writes TSV, so it can hold a line break, which becomes <br>, and "" for a quote. Turn that option off for plain TSV where a double quote is only a character. Short rows are padded with empty cells and blank lines are skipped.

Safety and output

Every cell is HTML-escaped, so a value such as <b>bold</b> is shown as text instead of being run. The output is a plain table with no CSS or classes, ready for your own styles. The Full HTML page button wraps the table in a small document with a UTF-8 declaration and a viewport tag. For a table that already carries inline styles, see the Tableizer tool.

Error messages and what to do

MessageWhat it meansFix
No rows foundThe input is empty.Paste at least one line of values.

Questions people ask

How do I convert TSV to an HTML table?

Paste the tab-separated text and press TSV to HTML. Each line becomes a table row. Copy the markup into your page or download it as an .html file.

What if my data has no header row?

Untick First row is header. Every line then becomes a body row and no thead is written. The output has no column names, since TSV has none to offer.

How are quotes treated?

With the quote option on, a field in double quotes can contain tabs and line breaks and "" means one quote. With it off, a quote is just a character and fields are split on tabs only.

Is it safe if my data contains HTML?

Yes. All cell text is escaped, so tags are displayed as text and do not run. The escaping covers &, <, >, double quotes and apostrophes.

Does it add CSS?

No, only table, thead, tbody, tr, th and td. Add your own stylesheet, or use the Tableizer tool if you want inline styles written for you.

About this tool

Each line becomes a table row and each tab a new cell. The first row becomes a <thead> with <th scope="col"> cells unless you turn the header option off. By default a field wrapped in double quotes is read the way Excel writes TSV, so it can hold a line break (written as <br>) and "" for a quote; turn the quote option off for plain TSV where a quote is only a character. Every cell is HTML-escaped, so markup in the data shows as text and does not run. Short rows are padded with empty cells and blank lines are skipped. The output has no CSS or classes. The Full HTML page button wraps the table in a minimal document with a UTF-8 declaration.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.