Markdown to LaTeX Converter
This Markdown to LaTeX converter turns Markdown into LaTeX: \section headings, itemize and enumerate lists, tabular tables, \href links and verbatim code. Math in $…$ and $$…$$ is kept as it is. Copy the body into your document or download a complete .tex file.
- Keeps your math
- Complete .tex or body
How to convert Markdown to LaTeX
Paste, choose the output, copy.
-
Paste your Markdown
Paste notes, a README or an AI answer with formulas.
-
Choose the output
Body only gives LaTeX to paste into a document you have. Complete document adds \documentclass, the packages it needs and \begin{document}. Choose verbatim or listings for code.
-
Copy or download
Click Copy LaTeX, or Download .tex and open it in your editor or Overleaf.
The sample keeps $R^2 = 0.94$ as inline math, turns the $$ block into \[ … \] and escapes the & in “& notes” as \&. The table becomes a tabular with the columns l r.
Markdown to LaTeX cheat sheet
What each piece of Markdown becomes.
| Markdown | LaTeX |
|---|---|
# · ## · ### | \section · \subsection · \subsubsection |
#### · ##### and ###### | \paragraph · \subparagraph |
**bold**, *italic*, ~~strike~~ | \textbf{}, \emph{}, \sout{} |
| Inline code | \texttt{} |
| Fenced code | verbatim, or lstlisting with the language |
[text](https://…) and bare links | \href{https://…}{text} and \url{} |
 | \includegraphics[width=\linewidth]{figure.png} |
- item and 1. item | itemize and enumerate; a list starting at 3 sets \setcounter{enumi}{2} |
- [x] task | \item[$\boxtimes$] and \item[$\square$] |
| A table | tabular with l, c or r columns and \hline rules |
> quote | The quote environment |
$x^2$ and $$ … $$ | Kept as $x^2$, and \[ … \] |
Packages in the complete document
The preamble loads only what your document uses.
| Package | Loaded when | For |
|---|---|---|
| inputenc, fontenc, amsmath | Always | UTF-8 text and math |
| amssymb | There’s a checklist | The ☐ and ☒ boxes |
| ulem (normalem) | There’s strikethrough | \sout |
| graphicx | There’s an image | \includegraphics |
| listings | You choose listings | Code blocks with a language |
| hyperref | There’s a link | \href and \url |
LaTeX special characters
LaTeX reserves 10 characters. In your text the converter escapes them; math and code are left exactly as written.
| In your text | In the LaTeX |
|---|---|
\ | \textbackslash{} |
{ and } | \{ and \} |
$ | \$ |
& | \& |
# | \# |
^ | \^{} |
_ | \_ |
% | \% |
~ | \textasciitilde{} |
| “Curly quotes” and … | TeX quotes, two backticks and two apostrophes, and \ldots{} |
Markdown to LaTeX Converter FAQ
Does it keep my math?
Yes. Inline $…$ stays as it is and $$…$$ becomes \[…\]. The LaTeX inside isn’t changed or escaped.
Should I choose verbatim or listings?
verbatim needs no package and keeps code exactly. listings adds the language for syntax highlighting and wraps long lines.
Which LaTeX engine should I use?
The complete document works with pdfLaTeX. If your text has emoji or scripts pdfLaTeX can’t set, compile with XeLaTeX or LuaLaTeX.
Can I use it with Overleaf?
Yes. Download the .tex file and upload it to an Overleaf project, or paste the body into a document you have there.
What happens to images?
They become \includegraphics at the full text width. Put the image files next to your .tex file so LaTeX can find them.
Is my Markdown uploaded?
No. The conversion runs in your browser, on this page, so your text is never sent to a server or saved. Closing the page clears it.
More markdown converters tools
- Convert Markdown to PDF Converter Turn Markdown into a formatted PDF, with tables, code blocks and links. Open tool
- Convert Markdown to HTML Converter Turn Markdown into clean HTML, or a complete styled page. Open tool
- Convert Markdown to Word Converter Convert Markdown to an editable Word document with real heading styles. Open tool
- Clean Remove Markdown Strip Markdown symbols and keep clean, readable plain text. Open tool