LaTeX Table Generator
Free LaTeX table generator. Build a tabular or booktabs table in a grid, set alignment and captions, then copy LaTeX code that compiles cleanly.
| Row actions | ||||
|---|---|---|---|---|
| Header | ||||
Import a markdown table, CSV or TSV
\begin{table}[htbp]
\centering
\caption{Sample inventory}
\label{tab:inventory}
\begin{tabular}{llrc}
\toprule
Product & Category & Price & In stock \\
\midrule
Notebook & Stationery & 4.50 & Yes \\
Desk lamp & Lighting & 29.99 & No \\
USB-C cable & Electronics & 9.00 & Yes \\
\bottomrule
\end{tabular}
\end{table}Column spec: llrc. Change it with the alignment buttons above each column.
Add \usepackage{booktabs} to your preamble for \toprule, \midrule and \bottomrule.
Escaping converts & % $ # _ { } ~ ^ and backslashes so cell text compiles. Turn it off if your cells already contain LaTeX such as $x^2$.
What Is a LaTeX Table Generator?
A LaTeX table generator turns cells typed into a grid into a tabular environment that compiles without edits: the column specification, the rows joined with & and ended with \\, the horizontal rules and, if you want them, the surrounding table float with caption and label. Special characters in your data are escaped so the document builds on the first try.
Writing tabular LaTeX by hand is slow because a single unescaped % or a missing \\ produces an error far from the cause. This latex table maker keeps the structure correct while you concentrate on the content, and it runs entirely in your browser.
How to Create a LaTeX Table
- Fill in the grid, or paste a markdown table or CSV through the import panel.
- Set each column's alignment with the icon above it. Numbers usually go right; the spec updates in the Notes pane.
- Choose booktabs for publication-style rules or Plain \hline for a gridded table.
- Add a caption and label and keep table environment on so the table floats and can be referenced.
- Copy the LaTeX table code into your document. Add \usepackage{booktabs} to the preamble if you used booktabs.
Tabular Column Specifiers Reference
The generator writes the common specifiers; you can edit the output to use the others:
| Specifier | Meaning | Generated |
|---|---|---|
| l | Left-aligned column, natural width | Left or default alignment |
| c | Centered column | Center alignment |
| r | Right-aligned column | Right alignment |
| | | Vertical rule between columns | Plain \hline style only |
| p{3cm} | Fixed-width column with wrapped text | Edit manually for long cells |
| S | Decimal-aligned numbers (siunitx) | Edit manually |
| \toprule \midrule \bottomrule | booktabs horizontal rules | booktabs style |
| \hline | Full-width horizontal line | Plain style, after every row |
booktabs Versus \hline
A LaTeX table with booktabs has three rules and no vertical lines, which is what most style guides and journal templates ask for; the rules have proper spacing above and below, so the table reads cleanly. The plain style puts \hline after every row and | between every column, giving the boxed look of a spreadsheet. It needs no extra package, which matters in restricted environments such as some journal submission systems and older Beamer templates. Both styles use the same tabular body, so you can switch at any time.
Markdown Table to LaTeX and Special Characters
Converting a markdown table to LaTeX is the most common import: paste the pipe table, and the alignment colons become l, c and r while pipes escaped as \| turn back into plain text. Escaping is applied after import, so units like 15%, names like R&D and identifiers with underscores compile unchanged. When a cell should contain real LaTeX, such as an inline formula, turn escaping off for that export. Used this way, the LaTeX table generator is a reliable bridge between documentation written in markdown and a paper or thesis typeset in LaTeX.
Frequently Asked Questions
Why does the LaTeX table generator use booktabs by default?
The booktabs package produces the horizontal rules used in journals and theses: a heavier top and bottom rule, a lighter rule under the header and no vertical lines. It compiles with \usepackage{booktabs}. Switch to Plain \hline if you cannot add packages or your template expects grid lines.
Which characters are escaped?
Ampersand, percent, dollar, hash, underscore, braces, tilde, caret and backslash are replaced with their LaTeX equivalents, so a cell such as R&D or 15% compiles instead of producing an error. Turn Escape special characters off when your cells already contain LaTeX, for example math like $x^2$.
What do the l, c and r letters mean?
They form the column specification of the tabular environment: l is left aligned, c centered and r right aligned. The generator builds the specification from the alignment icons above each column, and adds vertical bars between letters in the plain \hline style.
Can I paste a markdown table?
Yes. Open the import panel, paste the markdown table and click Import; column alignment colons carry over to the LaTeX column spec. CSV and TSV work too.
How do I reference the table in my text?
Set a label such as tab:results and keep the table environment on. Then write Table~\ref{tab:results} in your document. The caption is placed above the tabular, which is the convention for tables.