Markdown to LaTeX converter
This Markdown to LaTeX converter turns your notes into a complete .tex document, or just the body to paste into a paper you already have. It runs in your browser and works with Overleaf and pdflatex.
Why convert Markdown to LaTeX?
Markdown is quick to write, but journals, theses and many course templates expect LaTeX. Converting Markdown to LaTeX lets you draft in plain text and still hand in a proper .tex file. Headings become \section and \subsection, bullet and numbered lists become itemize and enumerate, bold and italic become \textbf and \emph, and links use \href.
Maths is the part most converters get wrong. Here, anything between $…$ or $$…$$ is passed through untouched, so your equations stay real LaTeX. Text outside maths is escaped, so a stray % or & will not break the build. In full-document mode the first heading becomes the \title, and only the packages your content needs are added: hyperref for links, graphicx for images, booktabs for tables and ulem for strikethrough.
Some things do not carry over. Code blocks become plain verbatim without syntax colours, images keep their path, so you need to upload the image files to Overleaf yourself, and citations or cross-references must be added by hand. The rest of the md to LaTeX work is automatic, so these are the only parts you need to check. Everything runs on your device: nothing is uploaded.
A good workflow is to write and preview in markdown, convert, then make final tweaks in LaTeX. Untick Full document to get only the body, which you can drop between \begin{document} and \end{document} of a template that already has its own class and packages. Leave it ticked for a standalone file that compiles as it is with pdflatex, XeLaTeX or LuaLaTeX. Both options update as you type, and you can copy the code or download a .tex file named after your markdown file.
Why use this Markdown to LaTeX tool
Complete document
Preamble, title and only the packages your content needs.
Maths passes through
$…$ and $$…$$ maths are kept as real LaTeX.
Tables with booktabs
Markdown tables become clean booktabs tables with the right alignment.
How to convert Markdown to LaTeX
- Paste your markdown.
- Choose a full document or just the body.
- Copy the LaTeX or download a .tex file and open it in Overleaf.
Common uses for markdown to TeX conversion
- Turning lecture notes written in Obsidian or a plain editor into a LaTeX handout.
- Starting a paper in markdown and moving it to a journal template in Overleaf.
- Converting a README section with tables into a booktabs table for a report.
- Pasting just the body into an existing thesis chapter, without a second preamble.
- Making a quick .tex file from AI-written notes that already use
$…$maths. - Checking how your markdown to TeX output looks before sending it to a co-author.
Frequently asked questions
Are special characters escaped?
Yes: &, %, $, #, _ and braces are escaped outside maths.
Does it work with Overleaf?
Yes. Upload the .tex file or paste the code into a new project.
Can I convert LaTeX to markdown?
Yes, with LaTeX to Markdown.
What is lost when I convert Markdown to LaTeX?
Syntax highlighting in code blocks, image files themselves (only the path is kept), and anything markdown cannot express, such as citations, labels and cross-references. Text, structure, tables, links and maths are kept. If something looks off, fix it in the markdown and convert again rather than editing both copies.
Is my document uploaded anywhere?
No. The conversion runs in your browser, so your draft stays on your device. It is free and needs no sign-up, and it works on a phone or tablet too, though a larger screen is easier for long documents. To write the markdown first, try the online markdown editor.
Can I get a PDF instead of LaTeX?
If you do not need LaTeX itself, Markdown to PDF makes a print-ready PDF straight away. Use the .tex output when a template or publisher asks for LaTeX source.
Open editor