tsvkit.org
TSV Toolkit
Sample data Say hi →

TSV to LaTeX Table

booktabs or classic · auto alignment · special characters escaped

Paste your data, get a tabular environment you can drop straight into a paper. The tedious parts are handled: &, %, $, #, _, {, }, ~, ^, and backslashes are escaped so they typeset as themselves instead of producing a cryptic compile error, and numeric columns are right-aligned automatically.

latex
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the TSV. The header row becomes a bold heading row.
  2. Keep booktabs on unless your venue's template requires vertical rules — see below.
  3. Add \usepackage{booktabs} to your preamble if it isn't already there.
  4. Copy into your document or download as a .tex file to \input{}.

Why booktabs, and why no vertical lines

The booktabs package provides \toprule, \midrule, and \bottomrule — rules with proper weights and spacing above and below. Its documentation makes the typographic case bluntly: never use vertical rules, and never use double horizontal rules. Whitespace separates columns perfectly well, and the lines only add visual noise. Nearly every journal and conference template in use assumes this style, and a table with | everywhere reads as amateurish to a copy editor.

The classic mode (booktabs off) emits \hline and a fully ruled grid, for when a template mandates it or you're editing a document that already looks that way.

What isn't handled

Wide tables. A table wider than the text block will overflow the margin, and LaTeX only warns. Options are \small before the tabular, \resizebox{\textwidth}{!}{...} around it, the tabularx package with an X column, or rotating it with \begin{sidewaystable}. This tool doesn't guess which you want.

Long tables. A tabular can't break across pages. If the output is longer than a page, switch the environment to longtable (and the float wrapper off) — the row content is identical.

Maths. A cell containing $x^2$ has its dollars and caret escaped, so it typesets literally rather than as maths. That's the right default — the alternative would break every cell containing a real dollar amount. For a column of formulae, escape by hand after conversion.

Decimal alignment. Numbers are right-aligned, which lines up the units digit only if every value has the same number of decimals. For proper alignment on the decimal point, use the siunitx package's S column type and change the column spec by hand.

FAQ

Where do I put the label for \ref?

Immediately after the caption, inside the float: \label{tab:results}. It isn't generated because the label name should be yours, and a duplicated label is a confusing error to chase.

Does it handle non-ASCII characters?

They're passed through unchanged, which works with XeLaTeX, LuaLaTeX, or pdfLaTeX with \usepackage[utf8]{inputenc} (the default since 2018). Older setups may need transliteration.

Can it produce a Markdown or HTML table instead?

Yes — TSV → Markdown and TSV → HTML. For a plain-text table for a terminal or a code comment, TSV → ASCII table.

What about multirow or multicolumn cells?

Not generated — a flat table has no way to express a span. Add \multicolumn and \multirow by hand in the output; the structure is simple enough to edit.

Privacy

100% client-side. No upload. See the privacy policy.