LaTeX Table Generator
This LaTeX table generator turns a grid, or data pasted from a spreadsheet, into a tabular you can copy straight into your document.
Paste from Excel, Google Sheets or CSV
\usepackage{booktabs} to your preamble.\begin{tabular}{lcr}
\toprule
Material & Density (g/cm³) & Price \\
\midrule
Aluminium & 2.70 & \$2.40/kg \\
Steel & 7.85 & \$0.80/kg \\
\bottomrule
\end{tabular}
How do you make a table with this generator?
- Type into the grid, or open Paste from Excel, paste your cells and press Import.
- Set each column to left, center or right above the grid.
- Choose a border style and whether the first row is a header.
- Copy the code and add any package it names to your preamble.
Can you paste a table from Excel or CSV?
Yes. Cells copied from Excel or Google Sheets arrive separated by tabs and are split on those. CSV text works too, including quoted fields that contain commas. Characters LaTeX treats as special, such as %, &, $ and _, are escaped for you unless you tick "Cells contain LaTeX".
Which border style should you choose?
booktabs gives the clean three-rule look most journals ask for, using \toprule, \midrule and \bottomrule with better spacing than \hline. Choose the full grid only when a style guide asks for vertical lines.
How do you merge cells?
Replace the cells you want to join with \multicolumn{2}{c}{Text}, where 2 is the number of columns it spans. Spanning rows needs the multirow package and \multirow{2}{*}{Text}. The LaTeX tables guide shows both with compiled output.
What if the table is wider than the page?
Shorten headers first, then let long text wrap with a p{4cm} column instead of l. As a last resort, \resizebox{\linewidth}{!}{…} from graphicx shrinks the whole table. For a table on a web page instead of a PDF, paste the LaTeX into the LaTeX to HTML converter. For a grid of numbers inside a formula, a matrix is the better tool.
Text drafted with AI from the booktabs, multirow and LaTeX documentation; checked by Cem Demir. See the editorial policy.