Markdown to LaTeX
Paste Markdown or upload a .md file and this Markdown to LaTeX converter writes the LaTeX as you type. Equations pass through untouched, and tables, code, footnotes and citations become their LaTeX equivalents, ready for Overleaf or a journal template.
LaTeX
\section{Gaussian integrals}
The integral of $e^{-x^2}$ over the real line is a classic result.
\subsection{Result}
\[
\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
\]
\begin{itemize}
\item Square the integral and switch to \textbf{polar coordinates}.
\item See the proof in \href{https://en.wikipedia.org/wiki/Gaussian_integral}{Wikipedia}.
\end{itemize}
\begin{table}[htbp]
\centering
\begin{tabular}{lr}
\toprule
\textbf{Method} & \textbf{Steps} \\
\midrule
Polar & 3 \\
Series & 5 \\
\bottomrule
\end{tabular}
\end{table}
It is used throughout statistics \cite{feller1968}.\footnote{The normal density integrates to 1 because of it.}Add to your preamble: \usepackage{amsmath} \usepackage{booktabs} \usepackage{hyperref}
Notes on paper or in a PDF instead? Convert them to LaTeX directly.
Convert a fileHow to convert Markdown to LaTeX
Paste or upload the Markdown
Paste text into the box or upload a .md file exported from Obsidian, Notion, Typora, a GitHub README or a Jupyter notebook. The Markdown to LaTeX conversion runs in your browser on every keystroke, so you see the result at once and the file never leaves your computer.
Choose the output
Choose how the Markdown to LaTeX result is wrapped. Body only gives content to paste into an existing document or template. Complete document adds the document class, the packages and \begin{document}, ready to compile. Map # to \section for an article, to \chapter for a thesis, or use the first # as the title.
Copy it into your document
Copy or download the .tex. When you paste body content, add the \usepackage lines listed under the output, such as hyperref for links or booktabs for tables. Then compile in Overleaf or locally and adjust anything specific to your template.
What converts, and how
Text, lists and links
In Markdown to LaTeX conversion, bold becomes \textbf, italics \emph, strikethrough \sout and inline code \texttt. Bullet and numbered lists become itemize and enumerate, keep their nesting and start number, and task lists get box markers. Links turn into \href, or \url when the text is the address. Special characters such as %, & and _ are escaped.
Math stays exactly as written
Inline $…$ and \(…\), display $$…$$ and \[…\], and ```math blocks are lifted out before the Markdown is parsed and put back untouched. A $$ block that holds a whole environment, such as align*, is kept as that environment. Dollar amounts like $5 are not mistaken for math.
Tables, code, images and quotes
Pipe tables keep their column alignment and become booktabs tables or a longtable. Fenced code becomes verbatim, or lstlisting with the language set. An image on its own line becomes a figure with the alt text as caption. Quotes become quote environments, and raw HTML is kept as % comments.
From notes to a paper
Footnotes and citations
Footnotes written as [^1] with a [^1]: definition become \footnote{…} in place. Pandoc-style citations such as [@knuth1984; @lamport1994] become \cite{knuth1984,lamport1994}; add your .bib file and a bibliography command and they resolve as usual.
Drafting in Markdown, finishing in LaTeX
Many people write lecture notes, lab notebooks and first drafts in Markdown, then need LaTeX for a template, numbered equations and references. Converting Markdown to LaTeX instead of retyping keeps every heading, list and equation you already wrote.
Polishing tables after conversion
Markdown tables cannot merge cells or set widths. After converting, load the tabular into the table generator to merge cells, add vertical lines or switch to a full-width layout, then paste it back.
LaTeX table generatorOfficial references: CommonMark · Pandoc manual

Markdown and LaTeX questions
- How to write LaTeX in Markdown?
- Put inline math between single dollar signs, $x^2$, and display math between double ones, $$…$$. GitHub, Jupyter, Obsidian and most editors render it, and this Markdown to LaTeX converter keeps it unchanged.
- How to use LaTeX in R Markdown?
- Write math with $…$ and $$…$$ as in plain Markdown. For packages, list them under header-includes in the YAML header, or add a preamble file through the pdf_document output options.
- Does GitHub Markdown support LaTeX?
- Yes, GitHub renders math with MathJax between $…$ and $$…$$ and in ```math blocks. It does not run full LaTeX documents or packages.
- Can Markdown replace LaTeX?
- For notes, READMEs and simple reports, often yes. Journal templates, cross-references, bibliographies and precise layout still need LaTeX, which is why Markdown to LaTeX conversion is common at submission time.
- Does Markdown support LaTeX?
- Standard Markdown has no math, but almost every renderer adds LaTeX math with dollar signs through MathJax or KaTeX. Full LaTeX commands outside math usually do not work.
- How to use LaTeX in Markdown Jupyter?
- In a Markdown cell, type $…$ for inline math or $$…$$ on its own lines for display math. Jupyter renders it with MathJax when the cell runs.
- How to use dollar sign in Markdown without LaTeX?
- Escape it as \$. This converter also treats amounts such as $5 and $10 as plain text, writing \$5 in the LaTeX.
- How to incorporate Markdown into LaTeX?
- Convert it first, then \input the result or paste it into your document. The markdown package can read Markdown inside LaTeX directly, but it needs shell escape and is less predictable.
- Can it convert Markdown tables to LaTeX?
- Yes. The Markdown to LaTeX converter turns pipe tables into booktabs tables, with the header in bold and each column's alignment kept, or a longtable that breaks across pages.
- How is this different from converting Markdown to LaTeX with Pandoc?
- Pandoc is a command-line program with many formats and templates. This page needs no install, shows the result as you type, and writes plain LaTeX without Pandoc's helper macros.
- How do I convert Markdown to LaTeX in Python?
- Call Pandoc through pypandoc: pypandoc.convert_text(text, 'latex', format='md'). For a one-off file, pasting it here is quicker.
- How do I use the converted LaTeX in Overleaf?
- Choose Complete document and paste it into a new project's main.tex, or paste the body into your template and add the listed packages to its preamble.
- Can I turn Markdown into Beamer slides?
- Not directly here; the output is an article or report. Pandoc with -t beamer makes slides from Markdown, using each heading as a frame.
- How do I get a PDF from Markdown through LaTeX?
- Run Markdown to LaTeX with Complete document, then compile the .tex with pdfLaTeX, for example in Overleaf. You get LaTeX typesetting for the whole document, equations included.
- Is this Markdown to LaTeX converter free to use online?
- Yes. It is free, needs no sign-up and has no length limit beyond a 2 MB file.
- Which Markdown features does the converter handle?
- The Markdown to LaTeX converter handles headings, emphasis, strikethrough, inline code, lists, task lists, links, images, tables, code blocks, quotes, rules, footnotes, citations and all common math syntax.
- What happens to raw HTML in the Markdown?
- HTML blocks are kept as % comments, so nothing disappears silently, and inline HTML tags are dropped. Rewrite anything important in Markdown or LaTeX.
Have a whole page of notes, a scan or a PDF? Convert it to LaTeX that compiles.
Convert a file