Back to Blog

Convert LaTeX to PDF, Word & Markdown

Shihab Shahriar Antor•June 16, 2026•Updated October 2026

To convert LaTeX to PDF, compile it in a browser editor like LetX (no install, a few seconds). To convert LaTeX to or from Word or Markdown, use Pandoc on your own computer (pandoc in.tex -o out.docx). PDF back to LaTeX is the hard direction: a PDF throws away the source, so you rebuild it, by hand or with an AI assistant that reads the pages, and then check it. Details below.

LaTeX → PDF (the easy one)

Compiling LaTeX is converting it to PDF. The only question is where the compiler runs. Locally you’d install a TeX distribution and run latexmk -pdf paper.tex. Online, open the project in LetX and press compile. It runs the same latexmk on cloud workers and returns the PDF in a few seconds, with SyncTeX so you can jump between source and output. Upload an existing project as a .zip to convert a whole folder at once.

LaTeX ↔ Word

LetX gives you the PDF and the source (download it as a zip); it does not export Word itself. The standard tool both directions is Pandoc, run on your own computer:

# LaTeX to Word
pandoc paper.tex -o paper.docx

# Word to LaTeX
pandoc paper.docx -o paper.tex

Pandoc handles headings, lists, tables, and citations well. Where it struggles: complex equations, custom macros, and bespoke layouts. Expect to clean those up by hand. For Word → LaTeX, the output is a solid starting skeleton you then refine in the editor rather than a finished document.

PDF → LaTeX (the hard direction)

There is no lossless PDF-to-LaTeX conversion: a PDF is the rendered output with the source discarded. What works is rebuilding. In LetX, Lexi, the AI assistant in the editor, does this with /pdf-to-tex, which reads each page and writes the LaTeX for it, and /image-to-tex for a screenshot of a single equation or table. Free accounts get a few Lexi runs to try it, and paid plans a monthly allowance. It works best on documents, forms and slides; a dense paper needs more checking. Start from the right template, compile, and compare the result with the original. The PDF to LaTeX guide covers what comes back and what does not.

Markdown ↔ LaTeX

Drafting in Markdown and publishing in LaTeX is a fast workflow. Run pandoc notes.md -o notes.tex. Headings, lists, and emphasis map to LaTeX commands and $...$ math is preserved. The other way, pandoc paper.tex -o paper.md gives you Markdown, though custom macros and complex layouts will not survive. The full guide covers the details.

Frequently asked questions

How do I convert LaTeX to PDF online for free?

Open your .tex file in a browser-based LaTeX editor like LetX and click compile. It runs latexmk and returns a PDF in a few seconds. No local TeX distribution to install.

How do I convert LaTeX to Word?

Use Pandoc on your own computer: pandoc paper.tex -o paper.docx. LetX does not export Word itself, so download the source as a zip first. Pandoc maps most LaTeX structure to a .docx, though complex math and custom macros may need cleanup. For the reverse (Word to LaTeX) run pandoc paper.docx -o paper.tex.

How do I convert a PDF back to LaTeX?

Nothing can extract LaTeX from a PDF, because a PDF discards the source. It can be rebuilt: in LetX, Lexi, the AI assistant in the editor, reads a PDF with /pdf-to-tex (or a screenshot of an equation or table with /image-to-tex) and writes LaTeX you then compile and check against the original.

How do I convert Markdown to LaTeX?

Run pandoc notes.md -o notes.tex with Pandoc. It maps headings, lists, and emphasis to LaTeX commands and keeps $...$ math as math.

Keep reading

Ready to try LetX?

Join researchers and students focusing on their work, not the tools.

Get Started Free
Shihab Shahriar Antor

Written by Shihab Shahriar Antor , AI Engineer & Founder of Shahriar Labs. Builder of LetX (collaborative LaTeX) and offSchool (SSC science and maths, learned through simulations).