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-alignedc— centeredr— right-alignedp{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?
\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?
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?
Why isn't my booktabs code compiling?
\usepackage{booktabs} to your preamble. Booktabs commands (\toprule, \midrule, \bottomrule) are not part of base LaTeX.More LaTeX tools
LaTeX to PDF
Full LaTeX editor with math, images, and 15+ templates.
Resume Generator
Form-driven LaTeX resume with photo support.
Equation Editor
Type LaTeX math, export as PNG or SVG.
Research Paper Templates
IEEE, ACM, Elsevier, Springer, APA templates.
Symbols Cheatsheet
500+ LaTeX symbols, searchable.
CSV / JSON tools
Convert tabular data between formats.