csvkit.org
CSV (Comma-Separated Values) utilities, in the browser
Say hi →

CSV to LaTeX Table

tabular / longtable · booktabs · auto alignment · caption & label · escaping

Generate a LaTeX table from a CSV without hand-typing ampersands and double backslashes. Numeric columns are right-aligned automatically, special characters are escaped so & and % in your data don't break compilation, and you can wrap it in a float with a caption and a label ready to \ref.

csv → latex
Or drop a .csv file here, or
ready

How to convert CSV to LaTeX

  1. Paste the CSV or drop a file.
  2. Pick tabular for a table that fits on one page, or longtable for one that spans pages with a repeating header.
  3. Add a caption and label if you want to reference the table in your text.
  4. Copy the output into your document, or download the .tex and \input it.

Packages you may need

Escaping, and when to turn it off

LaTeX reserves ten characters, and a stray & or _ from a CSV cell will stop compilation with a confusing error a hundred lines later. Escaping converts & % $ # _ { } and turns ~ and ^ into their text commands, which is right for ordinary data. Turn it off only when your cells deliberately contain LaTeX — inline maths like $\alpha$, or a \textbf{} you put there on purpose.

Alignment is inferred, not guessed at random

Each column is sampled and gets r if every non-empty value parses as a number, otherwise l. Right-aligned numbers line up on their digits, which is what makes a table readable. For decimal-point alignment across mixed precision, edit the spec to use the siunitx package's S column type.

FAQ

Can I get a Markdown table instead?

Yes — CSV to Markdown, or CSV to ASCII table which also has a Markdown style.

My table is too wide for the page.

Wrap it in \resizebox{\textwidth}{!}{…}, or reduce the columns first with Keep / rename / reorder.

Does it handle multi-line cells?

Cell content is emitted as-is on one line. For wrapping text, change the column spec to p{3cm} after generating.

Is anything uploaded?

No — it runs in your browser.

Privacy

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