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.
Sample data shown — paste or drop your own to replace it.
How to convert a Markdown table to LaTeX in 3 steps
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.
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.
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
| 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} |\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 to and from other formats
Also useful
Convert Markdown to…
- Markdown Table to CSVExport a Markdown table as RFC 4180 CSV.
- Markdown Table to TSVCopy as tab-separated values that paste cleanly into Excel and Sheets.
- Markdown Table to HTMLExport semantic <table> markup.
- Markdown Table to JSONExport rows as an array of JSON objects.
- Markdown Table to SQLGenerate CREATE TABLE and INSERT statements.
- Markdown Table to ExcelDownload a real .xlsx with numbers, bold header and one sheet per table.
- Markdown Table to Google SheetsCopy a table that pastes cleanly into Google Sheets.
- Markdown Table to WordCopy a formatted table into Word or Google Docs, or download .docx.
- Markdown Table to ConfluenceWiki markup, storage format or a rich copy for the Cloud editor.
- Markdown Table to JiraConvert to Jira and Confluence wiki markup.
- Markdown Table to ImageRender the table as a PNG or SVG for slides and posts.
Convert to Markdown from…
- CSV to Markdown TableConvert CSV text or .csv files, including quoted cells.
- Excel to Markdown TablePaste cells copied from Excel straight into a Markdown table.
- Google Sheets to Markdown TablePaste a copied range or a public sheet URL.
- TSV to Markdown TableConvert tab-separated text into a Markdown table.
- HTML Table to MarkdownConvert <table> markup into a Markdown table.
- JSON to Markdown TableConvert a JSON array of objects into a table.
- SQL to Markdown TableConvert MySQL, PostgreSQL or SQLite CLI query output.
- Word Table to MarkdownPaste a table copied from Word or Google Docs.
- Web Table to MarkdownCopy a table from any web page and paste it here.
- Image to Markdown TableTurn a screenshot or photo of a table into Markdown in your browser.
- PDF to Markdown TableExtract a table from a PDF page, with OCR for scans.
- Universal Table to MarkdownPaste anything tabular; the format is detected for you.
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
| Platform | Support | Notes |
|---|---|---|
| Overleaf, pdfLaTeX, XeLaTeX, LuaLaTeX | Supported | Plain tabular; no extra packages needed for the generated code. |
| booktabs | Supported | Not generated, but easy to switch to by replacing the \hline rules. |
| Pandoc (Markdown to LaTeX) | Supported | Pandoc 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.