All Tools

LaTeX Table Generator

Build tables visually. Export clean tabular or booktabs LaTeX. CSV import. Free.

Style:

Table builder

Click any cell to edit. Use the dropdowns above each column to set alignment. Hit Add row / Add column to grow the table.

LaTeX code


            

Booktabs requires \usepackage{booktabs} in your preamble.

Sample LaTeX tables

Five common table patterns with their LaTeX code.

Basic 3-column table (tabular)

\begin{tabular}{|l|c|r|}
\hline
Name & Score & Rank \\
\hline
Alice & 92 & 1 \\
Bob & 87 & 2 \\
\hline
\end{tabular}

Booktabs (clean academic style)

\begin{tabular}{lcr}
\toprule
Name & Score & Rank \\
\midrule
Alice & 92 & 1 \\
Bob & 87 & 2 \\
\bottomrule
\end{tabular}

With caption and label

\begin{table}[h]
\centering
\caption{Results summary}
\label{tab:results}
\begin{tabular}{lcc}
\toprule
Method & Accuracy & F1 \\
\midrule
Baseline & 0.78 & 0.74 \\
Ours & 0.86 & 0.83 \\
\bottomrule
\end{tabular}
\end{table}

Multi-column header

\begin{tabular}{lcc}
\toprule
& \multicolumn{2}{c}{Metric} \\
\cmidrule(lr){2-3}
Model & Acc & F1 \\
\midrule
A & 0.78 & 0.74 \\
B & 0.86 & 0.83 \\
\bottomrule
\end{tabular}

LaTeX table syntax explained

A LaTeX table has two layers — the table environment (which holds the caption and positioning) and the tabular environment (which holds the actual rows and columns).

Column specifier

The argument after \begin{tabular} describes each column:

  • l — left-aligned
  • c — centered
  • r — right-aligned
  • p{3cm} — paragraph column with fixed width
  • | — vertical line between columns

Row separators

  • \hline — horizontal line (basic)
  • \toprule, \midrule, \bottomrule — booktabs lines (cleaner)
  • \cmidrule(lr){2-3} — partial line under columns 2-3

FAQ

What is the LaTeX command for tables?
Use \begin{tabular}{cols}...\end{tabular} where cols defines column alignment: l, c, r. Wrap in \begin{table}...\end{table} for a caption and label.
What is the difference between tabular and booktabs?
tabular is the base table environment. booktabs is a package that gives you \toprule, \midrule, and \bottomrule for cleaner, publication-quality tables — used by most academic journals.
How do I align columns in a LaTeX table?
Pass alignment characters: l (left), c (center), r (right), p{width} (paragraph). Example: \begin{tabular}{l|c|r} creates left, center, right alignment with vertical lines between.
Can I import CSV?
Yes. Click Import CSV and paste a CSV. The first row becomes the header (if "First row is header" is checked), and each remaining row becomes a table row.
Why isn't my booktabs code compiling?
Add \usepackage{booktabs} to your preamble. Booktabs commands (\toprule, \midrule, \bottomrule) are not part of base LaTeX.

More LaTeX tools