Markdown to LaTeX Converter
Paste markdown and get a LaTeX document that compiles in Overleaf or any TeX install, with special characters escaped, math kept as is, and tables as tabular.
How to Use This Tool
Paste markdown
Paste a README, notes, or a ChatGPT answer, or open an .md file.
Pick the options
Keep Full document for a standalone file, or uncheck it to paste into an existing paper.
Copy or download
Click Copy LaTeX to paste into Overleaf, or Download .tex to compile locally.
Markdown to LaTeX Reference
| Markdown | Example | LaTeX |
|---|---|---|
| Title | # Report | \title{Report} |
| Headings | ## Method | \section{Method} |
| Bold and italic | **a** _b_ | \textbf{a} \emph{b} |
| Inline code | `x_1` | \texttt{x\_1} |
| Lists | - item / 1. item | itemize / enumerate |
| Task lists | - [x] done | \item[$\boxtimes$] done |
| Links | [text](https://...) | \href{https://...}{text} |
| Images |  | figure with \includegraphics |
| Tables | | a | b | | tabular with \toprule |
| Code blocks | ```python | lstlisting [language=Python] |
| Quotes | > text | quote environment |
| Math | $x^2$ and $$\frac{a}{b}$$ | $x^2$ and \[ \frac{a}{b} \] |
| Special characters | 50% & $5 | 50\% \& \$5 |
Markdown to LaTeX Online, Without Pandoc
Moving notes, a README, or an AI draft into a paper usually means pandoc on the command line or fixing escapes by hand: every percent sign, ampersand, and underscore in markdown is a compile error in LaTeX. This converter escapes them for you and leaves the math alone, so a formula written as $\frac{a}{b}$ arrives exactly as you typed it.
The output is plain, readable LaTeX with only standard packages, meant to be edited further. A single top heading becomes the document title, and the rest of the headings move up a level to \section and \subsection.
Going the other way? The LaTeX to Word converter turns a .tex file into a .docx with editable Word equations, and Markdown to PDF typesets markdown and math without any LaTeX at all.
Frequently Asked Questions
How do I convert markdown to LaTeX?
Paste the markdown into the box or open an .md file. The LaTeX appears on the right as you type. Click Copy LaTeX or Download .tex. Headings become sections, lists become itemize and enumerate, tables become tabular, and links become \href.
Will the .tex file compile?
It is written to compile as is with pdfLaTeX, XeLaTeX, or LuaLaTeX, using only packages that ship with TeX Live, MiKTeX, and Overleaf: amsmath, amssymb, graphicx, booktabs, tabularx, listings, ulem, and hyperref, each loaded only when the document needs it. Box-drawing lines, like those in a directory tree, become ASCII. Characters pdfLaTeX has no font for, such as Chinese or Cyrillic, are declared in the preamble so pdfLaTeX prints a question mark instead of stopping. To print them, compile with XeLaTeX or LuaLaTeX and pick a font that has them with \setmainfont.
How do I open it in Overleaf?
In Overleaf, choose New Project > Blank Project, replace the contents of main.tex with the copied LaTeX, and click Recompile. Or download the .tex and use New Project > Upload Project. If the markdown has images, upload the image files to the project with the same names.
Which characters get escaped?
The ten characters LaTeX treats as special in text: # $ % & _ { } ~ ^ and the backslash. So "50% off" becomes 50\% off and "R&D" becomes R\&D. Text inside math is left alone. Symbols like α, →, ≤ and ★ typed as text become math commands such as \alpha, so pdfLaTeX can print them.
What happens to math?
It is passed through untouched. Inline $...$ stays inline math, and $$...$$ or \[...\] becomes a display equation. An align or gather environment written inside $$ is kept as that environment, since it cannot sit inside \[ \].
How are code blocks and images handled?
Code blocks become lstlisting with line wrapping and the language set when listings knows it. Code with non-ASCII characters uses verbatim instead, since listings cannot handle them. Images become \includegraphics inside a figure with the alt text as the caption, wrapped so the document still compiles before you upload the image file.
Can I get only the body, without the preamble?
Yes. Uncheck Full document to get just the content, with a comment listing the packages it needs, ready to paste into an existing paper. Uncheck Numbered sections to get \section* headings.
Can I convert a ChatGPT answer to LaTeX?
Yes. ChatGPT and Claude answer in markdown with LaTeX math. Paste the answer from the copy button and you get a document with the math intact and the markdown turned into LaTeX structure.
How do I turn markdown into a PDF with LaTeX?
Convert it here, then compile the .tex in Overleaf or with pdflatex on your machine. That route gives you LaTeX typesetting and lets you edit the layout. If you only need a clean PDF and not the LaTeX source, Markdown to PDF makes one directly in the browser.
Can I write markdown inside a LaTeX document instead?
Yes, with the markdown LaTeX package, which reads markdown at compile time and needs LuaLaTeX or shell escape (Overleaf allows it). This converter is for the opposite case: you want plain LaTeX you can edit and share without extra packages.
Is this the same as Pandoc?
It does what pandoc -f markdown -t latex does for everyday documents, without installing anything. Pandoc supports more extensions such as footnotes and citations. Raw HTML in the markdown is dropped here, emoji in text are removed because pdfLaTeX cannot print them, and lists nested deeper than four levels are flattened to fit LaTeX limits.
Is my markdown uploaded?
No. The conversion runs in your browser, and the text never leaves your device.
More Free Markdown Converters
Markdown to Slack
Convert between standard Markdown and Slack mrkdwn format instantly. Supports bold, italic, links, code blocks, and more. Works in both directions.
Remove Em Dashes
Replace every em dash in ChatGPT, Claude, or Gemini output with a comma, period, colon, or hyphen. Also fixes curly quotes and invisible characters.
LinkedIn Text Formatter
Turn a ChatGPT draft or markdown into a LinkedIn post with Unicode bold and italic, clean bullets, and a preview of the "see more" fold.
Markdown to Word
Turn markdown into a real .docx with Word headings, lists, tables, and code blocks. Download the file or copy and paste straight into Word.
Markdown to PDF
Paste markdown or open an .md file and download a clean PDF with tables, code blocks, math, and clickable links. No watermark, nothing uploaded.
IPYNB to PDF
Turn a Jupyter notebook into a PDF with its plots, pandas tables, math, and code. No Python or LaTeX install. Also exports Word, HTML, and Markdown.
Markdown to Google Docs
Paste AI output or a README into Google Docs with headings, tables, and checklists intact. Copy formatted text or download a .docx for Drive.
Markdown to Rich Text and HTML
Render markdown as formatted text you can paste into any editor, CMS, or form that does not understand markdown. Copy as rich text or HTML.
Markdown to Email
Convert markdown into email-safe HTML with inline styles. Paste formatted text into Gmail, Outlook, or Apple Mail, or copy the HTML source.
Markdown to Confluence
Get markdown into Confluence with tables, code blocks, and headings preserved. Copy formatted text for Cloud, or wiki markup for Server and Data Center.
Markdown to Jira
Convert markdown to Jira wiki markup for tickets, comments, the REST API, and automation rules. Handles tables, code blocks, and nested lists.
Confluence to Markdown
Copy a Confluence page and paste it to get clean markdown with code blocks, panels, tables, and task lists. Also reads wiki markup and storage format.
Jira to Markdown
Turn Jira wiki markup or a copied Jira issue into markdown for GitHub, Notion, or an AI chat. Handles {code}, {panel}, tables, and nested lists.
ChatGPT to PDF
Save a ChatGPT answer as a PDF with typeset equations, tables, and code. Accepts the copy button or a selection and strips citation markers.
ChatGPT to Word
Export a ChatGPT answer to a .docx where LaTeX math becomes native, editable Word equations instead of raw code.
LaTeX to Word
Turn a .tex file, LaTeX equations, or a ChatGPT answer into a .docx where every equation is a native, editable Word equation.
ChatGPT Exporter
Open your ChatGPT data export, search every chat, and save the ones you pick as PDF, Word, or Markdown. Large exports stay in your browser.
Claude Exporter
Export one Claude conversation or many from your data export to PDF, Word, or Markdown, with artifacts recovered. Nothing uploaded.
HTML to Markdown
Paste formatted text from a web page, Google Docs, or Word, or paste raw HTML, and get clean GitHub Flavored Markdown back.
Word to Markdown
Convert a Word .docx file to clean markdown in your browser. Keeps headings, lists, tables, links, and code. The file is never uploaded.
PDF to Markdown
Extract a PDF into structured markdown with headings, paragraphs, and lists, ready for ChatGPT, Claude, or your notes. Runs entirely in your browser.