Skip to content

Markdown Table to LaTeX Converter

Paste a Markdown table and copy a LaTeX tabular with l/c/r columns from your alignment and special characters escaped.

Paste a Markdown table

Sample data shown — paste or drop your own to replace it.

Converts as you type. CSV, TSV, HTML and JSON are detected too.
Output
\begin{tabular}{|l|c|c|c|}
\hline
Feature & Free Tier & Pro (\$12/mo) & Enterprise \\
\hline
Unlimited Tables & Yes & Yes & Yes \\
\hline
Custom Formatting & Basic & Advanced & Full Suite \\
\hline
Team Sharing & No & Up to 10 & Unlimited \\
\hline
Priority Support & Community & 24h SLA & Dedicated Rep \\
\hline
\end{tabular}
4 rows × 4 columns
Rendered Preview
FeatureFree TierPro ($12/mo)Enterprise
Unlimited TablesYesYesYes
Custom FormattingBasicAdvancedFull Suite
Team SharingNoUp to 10Unlimited
Priority SupportCommunity24h SLADedicated Rep

How to convert a Markdown table to LaTeX in 3 steps

  1. Paste the Markdown table

    Paste it into the Paste Markdown box (CSV, TSV and HTML tables are detected too), or upload a file. If the text holds several tables, the first one is converted.

  2. Check the LaTeX

    The LaTeX tab on the right is already selected and updates as you type. Column alignment from the Markdown becomes l, c or r. Use Edit grid to fix cells or alignment.

  3. Copy it into your document

    Click Copy LaTeX and paste the tabular into your .tex file or Overleaf project, usually inside a table environment you add yourself, or open Download for table.tex.

Example

Markdown table
| Metric | Baseline | Ours | Note |
| :--- | ---: | ---: | :---: |
| Accuracy | 71.2% | 78.9% | +7.7 pts |
| Cost ($) | 1_200 | 950 | 20% less |
| R&D team | 4 | 6 | C# {core} |
LaTeX output
\begin{tabular}{|l|r|r|c|}
\hline
Metric & Baseline & Ours & Note \\
\hline
Accuracy & 71.2\% & 78.9\% & +7.7 pts \\
\hline
Cost (\$) & 1\_200 & 950 & 20\% less \\
\hline
R\&D team & 4 & 6 & C\# \{core\} \\
\hline
\end{tabular}

Options explained

Paste Markdown box
Converts 150 ms after you stop typing, and immediately on paste. The badge shows the detected format. Only the first table in the text is used.
Upload file
Reads a .md, .csv, .tsv, .json, .html, .txt or Excel file from your computer without uploading it anywhere..md · .csv · .tsv · .json · .html · .txt · .xlsx · .xls · .ods
Paste / Sample / Clear
Paste reads the clipboard, Sample loads an example Markdown table, Clear empties the box.
Edit grid / Markdown tabs
Fix cells and headers, or set a column to left, center or right, which decides the l, c or r in the column spec. Undo and redo are available. The Markdown tab shows the source.
Tools
Auto-align (numbers right, text left), header case, transpose, and quick or deep clean for stray spaces and blank rows.Auto-align · UPPER · lower · Title Case · Transpose · Quick clean · Deep clean
Output tabs
This page opens on LaTeX. The same table can be switched to Markdown, HTML, CSV, TSV, JSON, SQL or Jira. There are no LaTeX style options: the table always uses vertical rules and \hline between rows.LaTeX (selected) · Markdown · HTML · CSV · TSV · JSON · SQL · Jira
Copy LaTeX
Copies exactly what the output box shows: one \begin{tabular} … \end{tabular} block.
Download
Saves the LaTeX as table.tex, or the table as an Excel workbook (.xlsx), a CSV file or a PNG image..tex · .xlsx · .csv · .png
Copy link
Copies a URL that reopens this table. The table is stored after #md= in the link, which browsers do not send to a server.

Convert Markdown to…

Convert to Markdown from…

Browse all 36 tools

About this tool

Paste a Markdown table and the LaTeX appears as you type: a tabular environment whose column spec (l, c or r) comes from your Markdown alignment, with vertical rules and an \hline after every row. The characters & % $ # _ { } ~ ^ and \ are escaped so the table compiles, and a <br> in a cell becomes \newline. It writes only the tabular: add the table float, caption and label yourself, and swap the rules for booktabs if your journal prefers it. Everything runs in your browser.

  • tabular with | rules and \hline between every row
  • Column spec from alignment: l, c or r (default l)
  • Escapes & % $ # _ { } ~ ^ and \ so the table compiles
  • <br> in a cell becomes \newline
  • Markdown \| is written as a plain |
  • Edit cells and alignment before copying
  • Runs in your browser; the table is not uploaded

Technical details

What the generated LaTeX looks like

The output is a single tabular environment, with no table float, caption, label or package lines. The column spec comes from the Markdown alignment, with a vertical rule between and around the columns, and an \hline after the header and after every row. It compiles with plain LaTeX, with no extra packages.

  • Column spec: Left, center and right alignment become l, c and r, and an unaligned column is l. The spec is joined with | so every column has a rule, for example {|l|r|r|c|}.
  • Rules: There is a single \hline above the header, one under the header, and one under each row. The booktabs rules (\toprule, \midrule, \bottomrule) are not used; swap them in by hand for a booktabs look.
  • Escaping: & % $ # _ { } become \& \% \$ \# \_ \{ \}, a backslash becomes \textbackslash{}, ~ becomes \textasciitilde{} and ^ becomes \textasciicircum{}, in headers and cells alike.
  • Not escaped: < > and | are written as they are. In the default OT1 font encoding they can print as ¡ ¿ and a dash, so add \usepackage[T1]{fontenc} or replace them with \textless{}, \textgreater{} and \textbar{}.
  • Line breaks: A <br> becomes \newline. In plain l, c and r columns LaTeX does not reliably break lines inside a cell, so use a fixed-width p{3cm} column or \makecell (makecell package) for multi-line cells.
  • No inline Markdown: **bold** and `code` stay as typed. Replace them with \textbf{} and \texttt{} by hand.
  • Unicode: Accents and symbols are written as typed. Use XeLaTeX or LuaLaTeX (or a recent pdfLaTeX with UTF-8 input) so they compile.

Tips and best practices

Wrap it in a table environment

Put the tabular inside \begin{table}[htbp] … \end{table} and add \centering, \caption{…} and \label{…} yourself. The converter does not write them.

Switch to booktabs for papers

Many journals prefer booktabs. Add \usepackage{booktabs}, replace the first \hline with \toprule, the one under the header with \midrule, the last with \bottomrule, and delete the others and the | in the column spec.

Convert in Overleaf, then compile

Paste the result into your project and compile once. If it fails, the error line usually points at a character that needs escaping (such as < or |) or at an unsupported Unicode symbol.

Common problems and fixes

The table runs off the page

Cause: l, c and r columns never wrap, so long cell text makes the table wider than the text block.

Fix: Use p{width} columns for long text, or wrap the tabular in \resizebox{\textwidth}{!}{…} (graphicx package) or \small.

< > or | print as ¡ ¿ or a dash

Cause: The default OT1 font encoding maps those characters differently, and the converter does not escape them.

Fix: Add \usepackage[T1]{fontenc}, or write \textless{}, \textgreater{} and \textbar{} in the cell.

Bold or code from Markdown shows as asterisks or backticks

Cause: Inline Markdown is not converted.

Fix: Replace **x** with \textbf{x} and `x` with \texttt{x} in the output.

Only the first table was converted

Cause: The converter reads one table at a time.

Fix: Paste each table separately.

Platform compatibility

PlatformSupportNotes
Overleaf, pdfLaTeX, XeLaTeX, LuaLaTeX SupportedPlain tabular; no extra packages needed for the generated code.
booktabs SupportedNot generated, but easy to switch to by replacing the \hline rules.
Pandoc (Markdown to LaTeX) SupportedPandoc can also convert a whole Markdown file; its output uses longtable and booktabs.

Frequently asked questions

How do I convert a Markdown table to LaTeX?

Paste the Markdown table into the box above. The LaTeX tab on the right is already selected and updates as you type. Click Copy LaTeX and paste the tabular into your .tex file or Overleaf project, or use Download to save table.tex.

Which special characters are escaped?

Ampersand, percent, dollar, hash, underscore and braces become \& \% \$ \# \_ \{ \}. A backslash becomes \textbackslash{}, a tilde \textasciitilde{} and a caret \textasciicircum{}. The angle brackets < > and the pipe | are not escaped, so add \usepackage[T1]{fontenc} if they print wrongly.

Does it use booktabs?

No. It writes plain tabular with vertical rules and \hline between rows, which needs no packages. For booktabs, add \usepackage{booktabs}, use \toprule, \midrule and \bottomrule in place of the first, header and last \hline, and delete the other rules and the | in the column spec.

Does it add a table environment, caption or label?

No, only the tabular. Wrap it in \begin{table}[htbp] … \end{table} and add \centering, \caption{…} and \label{…} yourself so LaTeX can number and place it.

How is column alignment translated?

Left (:---), center (:---:) and right (---:) become l, c and r, and an unaligned column becomes l. So | :--- | ---: | gives {|l|r|}.

What happens to bold, italics and code from Markdown?

They are not converted: **bold** and `code` stay as typed. Replace them with \textbf{…} and \texttt{…} in the output.

How do I make a long table fit the page?

l, c and r columns never wrap. Use p{3cm} style columns for long text, or wrap the tabular in \resizebox{\textwidth}{!}{…} (graphicx) or set \small before it.

Is my table uploaded anywhere?

No. Parsing and conversion run in your browser. A draft is saved in your browser’s local storage so a reload does not lose it, and Copy link puts the table after #md= in the URL, which browsers do not send to a server.