How to use this LaTeX table generator
- Set the rows and columns, or leave the 3 by 3 grid and type over the sample cells.
- Click a cell and type. Use Add Row and Add Col when the grid is too small.
- Set each column to left, center, or right. Tick “First row is header” if the first row is labels. Those cells are copied in bold, with a rule under them.
- Add a caption and a label if you want
\captionand\labelin the code. A label without thetab:prefix gets one added. - Choose Booktabs or Classic, then copy the LaTeX. The packages the table needs are named in comments at the top.
What the copied code looks like
Booktabs, a header row, a caption, and the label results copy as a table float with one tabular inside. Paste it into your document and add \usepackage{booktabs} to the preamble.
% \usepackage{booktabs}
\begin{table}[htbp]
\centering
\caption{Model comparison}
\label{tab:results}
\begin{tabular}{lcc}
\toprule
\textbf{Method} & \textbf{Accuracy} & \textbf{F1} \\
\midrule
Baseline & 82.1 & 0.71 \\
Ours & 91.4 & 0.84 \\
\bottomrule
\end{tabular}
\end{table}& separates cells and \\ ends a row. lcc means the first column is left-aligned and the next two are centered. \ref{tab:results} points at the label.
Booktabs or plain lines
Booktabs is the default. It writes \toprule, \midrule under the header, and \bottomrule, and it does not draw vertical lines. That is the look most journals use. Classic writes vertical bars in the column spec and \hline between rows. Switch the LaTeX style toggle and copy again. The same grid produces either version.
Merge cells
Select a block of cells and choose Merge Selected. A horizontal span is copied as \multicolumn. A vertical span is copied as \multirow. Split Selected removes the merge. If the code uses \multirow, the comment at the top names \usepackage{multirow}.
Excel and CSV
Save the sheet as CSV, then use Import CSV. The grid grows to the file. You can also type the cells by hand. A whole spreadsheet file, rather than one table you edit here, can go through the CSV to LaTeX converter.
Tables longer than a page
This generator writes one tabular inside a table float. A tabular does not break across pages. For a table that continues onto the next page and repeats its header, use longtable. That is a different environment, and tables that span multiple pages shows it.
Questions
Is the LaTeX table generator free?
Yes. You can build the table and copy the code with no account.
Can I paste straight from Excel?
Save the sheet as CSV first, then Import CSV. The generator reads that file into the grid.
Which style should a journal paper use?
Booktabs. It is the three-rule table without vertical lines. Use Classic only if a template asks for \hline and vertical bars.
Where is the longer table guide?
Column types, wide tables, captions, and the errors that stop a table compiling are in how to create a table in LaTeX. Merged-cell commands are spelled out in multirow and multicolumn.