How to Convert Word to LaTeX (Free, With Pandoc)

The most reliable free way to convert a Word document to LaTeX is Pandoc, a command-line converter that handles headings, lists, tables, footnotes, images, and most equations. Install Pandoc, open a terminal in the folder with your file, and run pandoc input.docx -s -o output.tex --extract-media=images. You’ll get a complete .tex file you can open in Overleaf or any LaTeX editor. Expect to tidy up tables, figures, and citations by hand afterward, because no converter gets everything perfect.

What you need

  • Your document saved as .docx. If it’s an older .doc file, open it in Word and choose File > Save As > Word Document (*.docx).
  • Pandoc, free from pandoc.org, for Windows, Mac, or Linux.
  • A LaTeX editor to check the result, such as Overleaf (online) or TeXstudio with MiKTeX or TeX Live. See how to install LaTeX in Windows 10.

Method 1: Convert Word to LaTeX with Pandoc

  1. Download and install Pandoc from pandoc.org. On Windows, you can also run winget install JohnMacFarlane.Pandoc.
  2. Open the folder with your .docx file in File Explorer, click the address bar, type powershell, and press Enter. On a Mac, open Terminal and use cd to go to the folder.
  3. Run pandoc --version to make sure it’s installed.
  4. Run pandoc thesis.docx -s -o thesis.tex --extract-media=images, replacing thesis with your file name.
  5. Open thesis.tex in your LaTeX editor, or upload it and the images folder to Overleaf, and compile it.
Terminal running a pandoc command to convert a Word docx file to a LaTeX tex file with images extracted
(1) Check that Pandoc is installed, then (2) run the conversion command. (Illustration)

What the options do

  • -s (standalone) creates a complete document with a preamble, so it compiles on its own.
  • -o sets the output file name. The .tex extension tells Pandoc to create LaTeX.
  • –extract-media=images saves the document’s pictures into an images folder and links them in the .tex file.

What converts well, and what needs fixing

Element How well it converts
Headings, bold, italics, lists Very well, if you used Word’s built-in heading styles
Equations made with Word’s Equation tool Usually well, converted to LaTeX math
Footnotes and links Well
Images Well, but you may want to wrap them in figure environments with captions
Complex tables and merged cells Often need manual cleanup
Citations and bibliography Converted as plain text. Recreate them with BibTeX or BibLaTeX.
Text boxes, columns, and page layout Not preserved. LaTeX handles layout differently.

Method 2: Convert individual equations in Word

If you only need the equations, Word can switch them to LaTeX:

  1. Click an equation in your document.
  2. On the Equation tab, choose LaTeX in the Conversions group.
  3. Click Convert > Current – Linear. The equation turns into LaTeX code you can copy.

For more, see how to use LaTeX in Word.

Tips for a cleaner conversion

  • Use Word’s Heading 1, Heading 2, and other built-in styles instead of manually formatted text. Pandoc turns them into \section and \subsection.
  • Remove extra blank lines and manual page breaks before converting.
  • Insert images inline with text rather than floating them.
  • Keep citations in a reference manager like Zotero so you can export a .bib file for LaTeX.
  • Check the output against the original and compile often while you clean it up.

Frequently asked questions

Can Overleaf convert Word documents?

Overleaf works best with .tex files. Convert your document with Pandoc first, then upload the .tex file and images folder to a new Overleaf project.

Is there an online Word to LaTeX converter?

Some websites offer conversions, but be careful uploading private or unpublished work to third-party sites. Pandoc runs on your own computer.

Can I convert LaTeX back to Word?

Yes. Pandoc works in reverse: pandoc paper.tex -o paper.docx. See how to convert LaTeX to Word.

Why won’t my converted file compile?

Look at the first error in your editor’s log. Common causes are special characters like &, %, or # in text, and packages your LaTeX installation is missing.