\usepackage{latex-to-docx}
How to Convert LaTeX to DOCX
A complete, step-by-step guide to converting LaTeX documents into Microsoft Word DOCX format. Whether you need to submit a paper to a journal that only accepts Word files, share a draft with a collaborator who does not use LaTeX, or archive your thesis in a universally readable format, this guide covers every method available.
You will learn how to use the free FormaTeX online converter, automate batch conversions with the REST API, handle common pitfalls like broken equations and missing fonts, and compare FormaTeX against alternatives like Pandoc and Overleaf.
\section{Why convert}
Why convert LaTeX to Word?
LaTeX produces beautifully typeset documents, but the academic and professional world does not run exclusively on LaTeX. Many journals, conferences, and publishers require manuscript submissions in Microsoft Word format. Springer, Elsevier, and Wiley all accept DOCX uploads, and some mandate it for the final camera-ready version. If you have spent months writing a paper in LaTeX, the last thing you want is to manually reformat it in Word. An automated converter preserves your equations, tables, citations, and section structure while producing a clean DOCX file that meets submission requirements.
Collaboration is another major reason. Not every co-author, reviewer, or supervisor is comfortable with LaTeX. Sending a DOCX file lets them use tracked changes and comments in Word or Google Docs, which is often the fastest feedback loop available. You can convert your LaTeX source to DOCX, collect comments, and apply the changes back to your original LaTeX file. This hybrid workflow is surprisingly common in interdisciplinary teams where some members work in LaTeX and others in Word.
Accessibility is a third consideration that is often overlooked. PDF files generated by LaTeX are not always screen-reader friendly. DOCX files, on the other hand, carry semantic structure that assistive technologies can parse more reliably. Converting to DOCX can be an intermediate step toward producing accessible documents, especially for institutions that must comply with accessibility standards like WCAG or Section 508. The conversion also makes it easier to extract plain text for translation services, plagiarism checkers, and language models that work better with structured document formats than with raw LaTeX markup.
\section{Step by step}
Step-by-step: Convert with FormaTeX
The FormaTeX LaTeX to DOCX tool runs entirely in the browser. You paste your LaTeX source, upload any companion files, and download the result. No account is required, and the tool is free to use. Here is how it works, step by step.
Step 1
Open the LaTeX to DOCX converter
Navigate to the FormaTeX LaTeX to DOCX tool. The page loads a code editor on the left and a settings panel on the right. There is no login wall and no installation required. The tool runs on any modern browser, including Chrome, Firefox, Safari, and Edge. You can also reach it from the main tools page at /tools.
Step 2
Paste or upload your LaTeX source
Paste your LaTeX source code directly into the editor. The editor provides syntax highlighting so you can verify that your document looks correct before converting. Alternatively, click the upload button to select a .tex file from your file system. The editor accepts any valid LaTeX document, from a simple one-page letter to a multi-chapter thesis with dozens of packages.
Step 3
Upload companion files
If your document references external files, upload them alongside your main .tex file. This includes images (.png, .jpg, .eps, .pdf), bibliography databases (.bib), custom class files (.cls), style files (.sty), and any other files that your document \input or \include commands depend on. Without these companion files, the compilation will fail or produce incomplete output. The upload area accepts multiple files at once.
Step 4
Select the compilation engine
Choose the TeX engine that matches your document. pdfLaTeX is the default and works for most documents written in English with standard packages. Choose XeLaTeX if your document uses system fonts via fontspec or contains extensive Unicode text in languages like Chinese, Japanese, Arabic, or Hindi. Choose LuaLaTeX if you use advanced font features, Lua scripting, or packages that require the LuaTeX engine. If unsure, start with pdfLaTeX. You can always re-run with a different engine if the compilation fails.
Step 5
Download the DOCX file
Click the Convert button. FormaTeX compiles your LaTeX document server-side using a full TeX Live installation, then converts the compiled output to DOCX format using Pandoc. The entire process typically takes between two and ten seconds, depending on document complexity. Once the conversion finishes, the download starts automatically. Open the resulting .docx file in Microsoft Word, Google Docs, LibreOffice Writer, or any application that supports the OOXML format.
\section{API conversion}
Using the API for batch conversion
The browser-based tool is ideal for one-off conversions, but if you need to convert dozens or hundreds of LaTeX files, the FormaTeX REST API is a much better fit. The API accepts a LaTeX file upload and a target format parameter, then returns the converted document as a binary response. You can call it from any language that supports HTTP requests.
To get started, create an account on FormaTeX and generate an API key from your dashboard. The API key is shown once on creation and stored as a SHA-256 hash on the server, so save it in a secure location like an environment variable or a secrets manager. Include the key in the Authorization header of every request.
Below are two examples: a minimal cURL command for quick terminal-based conversion, and a Python script that converts every .tex file in a directory. Both examples use the same API endpoint and produce identical results.
curl -X POST https://api.formatex.io/api/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "format=docx" \
-F "engine=pdflatex" \
-o thesis.docxThe cURL command sends a multipart form request with the LaTeX file, the target format (docx), and the compilation engine. The server compiles the document, converts it, and streams the DOCX binary back. The -o flag saves the output to a file.
import requests
import os
from pathlib import Path
API_KEY = os.environ["FORMATEX_API_KEY"]
BASE_URL = "https://api.formatex.io/api/v1"
def convert_latex_to_docx(
tex_path: str,
output_path: str,
engine: str = "pdflatex",
) -> None:
"""Convert a .tex file to .docx using the FormaTeX API."""
with open(tex_path, "rb") as f:
response = requests.post(
f"{BASE_URL}/convert",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": (Path(tex_path).name, f, "text/x-tex")},
data={"format": "docx", "engine": engine},
timeout=60,
)
response.raise_for_status()
with open(output_path, "wb") as out:
out.write(response.content)
print(f"Saved {output_path} ({len(response.content)} bytes)")
# Convert a single file
convert_latex_to_docx("paper.tex", "paper.docx")
# Batch convert every .tex file in a directory
for tex_file in Path("papers/").glob("*.tex"):
docx_file = tex_file.with_suffix(".docx")
convert_latex_to_docx(str(tex_file), str(docx_file))
print(f"Converted {tex_file.name} -> {docx_file.name}")The Python script defines a reusable convert_latex_to_docx function that handles file upload, error checking, and output saving. The batch loop at the bottom iterates over every .tex file in a directory and converts each one. You can extend this pattern to integrate with CI/CD pipelines, scheduled jobs, or document management systems.
Rate limits and compilation quotas depend on your plan. The free tier includes a generous number of conversions per month. For high-volume batch processing, consider the Pro or Team plans which offer higher rate limits and priority queue access. See the Python API guide for more examples, including async conversion with httpx and detailed error handling.
\section{Advanced tips}
Advanced tips for better conversion results
The converter handles most LaTeX documents out of the box, but there are several things you can do to improve the quality of the output. These tips apply whether you use the browser tool or the API.
Include all companion files
The most common cause of conversion failures is missing companion files. If your document uses \includegraphics, \bibliography, \input, or \include, make sure every referenced file is uploaded alongside your main .tex file. This includes .bib files for citations, image files in all formats your document references, custom .cls and .sty files, and any sub-documents loaded via \input. The converter cannot access files on your local machine, so everything must be uploaded explicitly.
Use UTF-8 encoding
Save your .tex files in UTF-8 encoding. The converter expects UTF-8 input, and documents saved in legacy encodings like Latin-1 or Windows-1252 may produce garbled characters in the output. Most modern editors default to UTF-8, but if you are working with older files, check the encoding in your editor settings. Adding \usepackage[utf8]{inputenc} to your preamble is also good practice, though pdfLaTeX assumes UTF-8 by default in recent TeX Live distributions.
Math rendering in DOCX
LaTeX math equations are converted to OOXML math objects in the DOCX output. This means they render natively in Word without requiring any plugins. Simple equations convert with high fidelity. Complex constructs like custom \DeclareMathOperator definitions, TikZ diagrams inside math environments, or heavily nested align environments may require manual adjustments in Word. For best results, keep your math markup as close to standard AMS math as possible.
Table handling
Standard tabular and tabularx environments convert well. If you use booktabs (\toprule, \midrule, \bottomrule), the converter translates these into appropriate Word table borders. Multi-column and multi-row cells are supported. However, very complex table layouts with nested tabulars, sideways tables, or longtable environments spanning multiple pages may not convert perfectly. In those cases, you may want to simplify the table structure before converting, or adjust the table manually in Word after conversion.
Pro tip: preview before converting
If you are unsure whether your document will convert cleanly, compile it to PDF first using the FormaTeX tool or the playground. If the PDF looks correct, the DOCX conversion will almost certainly succeed as well, since both pipelines start with the same compilation step.
\section{Troubleshooting}
Troubleshooting common issues
Most conversion issues fall into a handful of categories. Here are the problems users encounter most often, along with their solutions.
Compilation fails with "file not found" errors
This almost always means a companion file is missing. Check the error log for the exact filename that LaTeX cannot find. Common culprits are image files referenced by \includegraphics, bibliography files referenced by \bibliography or \addbibresource, and sub-documents referenced by \input or \include. Upload all missing files and try again. Remember that file paths are case-sensitive on Linux, so "Figure1.png" and "figure1.png" are different files.
Equations appear as images instead of editable math
This can happen when the converter falls back to image-based math rendering for complex expressions. To get editable OOXML math objects, keep your equations as simple as possible and avoid custom macros in math mode. If you define custom commands with \newcommand, try expanding them manually before converting. Standard AMS math environments like equation, align, gather, and multline convert to native Word math with the highest fidelity.
Fonts look different in the Word output
The DOCX format uses different fonts than LaTeX. Computer Modern, the default LaTeX font, does not exist in Word, so the converter substitutes it with a similar serif font. If your document uses fontspec with specific system fonts, those fonts may not be available on the conversion server. For the most consistent results, use standard LaTeX fonts or well-known alternatives like Times New Roman, Palatino, or Latin Modern. You can always change the font in Word after conversion.
Tables are misaligned or missing borders
Complex table layouts sometimes lose their alignment during conversion. If you use longtable or sideways table environments, the converter may not reproduce the exact layout. booktabs rules generally convert well, but custom \cline and \multicolumn combinations can produce unexpected results. For critical tables, open the DOCX file in Word and use the table design tools to adjust borders and cell alignment. Alternatively, simplify your table structure before converting.
The conversion times out or returns a server error
Very large documents with many images, complex TikZ diagrams, or packages that require multiple compilation passes may exceed the default timeout. If this happens with the browser tool, try the API with a longer timeout parameter. You can also split your document into smaller chapters and convert them individually. If you are on the free tier, note that there are rate limits. Wait a few seconds between requests or upgrade to a paid plan for higher limits and priority processing.
\section{Comparison}
FormaTeX vs alternatives
There are several ways to convert LaTeX to DOCX. Here is how FormaTeX compares to the most common alternatives. For a deeper comparison of all LaTeX conversion tools, see the best LaTeX converters page.
| Feature | FormaTeX |
|---|---|
| No installation | Yes |
| Full TeX Live | Yes |
| REST API | Yes |
| Batch conversion | Via API |
| Companion file support | Yes |
| Math to OOXML | Yes |
| Free tier | Yes |
Pandoc CLI
Pandoc is the open-source engine that powers most LaTeX to DOCX converters, including FormaTeX. If you already have Pandoc and TeX Live installed locally, you can run the conversion from the command line. The advantage of FormaTeX is that it bundles TeX Live and Pandoc into a single web-based workflow, so you do not need to install or maintain anything. FormaTeX also adds a REST API for programmatic access, which Pandoc alone does not provide.
Generic online converters
Websites like CloudConvert, Zamzar, and Convertio offer LaTeX to DOCX conversion, but most of them have significant limitations. They often do not support companion files, cannot handle complex documents with custom packages, and produce lower-quality output because they skip the full LaTeX compilation step. FormaTeX compiles your document with a complete TeX Live installation before converting, which ensures that equations, citations, and cross-references are resolved correctly.
Overleaf export
Overleaf is a collaborative LaTeX editor, not a converter. While you can download your compiled PDF from Overleaf, it does not offer direct DOCX export. If you work in Overleaf and need a Word file, you would still need to download your .tex source and convert it using a tool like FormaTeX. The FormaTeX browser tool accepts .tex file uploads, so the workflow is straightforward: download from Overleaf, upload to FormaTeX, download the DOCX.
\section{FAQ}
Frequently asked questions
Is the LaTeX to DOCX converter free?
Yes. The browser-based LaTeX to DOCX tool is completely free to use with no account required. You can convert as many documents as you need directly from your browser. The REST API also has a free tier with a generous monthly quota. Paid plans are available for higher volumes, faster processing, and priority support.
Are my documents stored on the server?
No. All uploaded files and compilation artifacts are ephemeral. They are deleted from the server immediately after the conversion response is sent. FormaTeX does not store, index, or analyze your LaTeX source code or the converted output. Your documents are processed in isolated containers and discarded as soon as the download completes.
Can I convert to other formats besides DOCX?
Yes. FormaTeX supports six document conversion formats: DOCX, HTML, EPUB, Markdown, plain text, and ODT. Each format has its own dedicated tool. You can find all of them on the LaTeX tools guide page. The most commonly used alternatives to DOCX are LaTeX to HTML for web publishing and LaTeX to EPUB for e-book distribution.
What LaTeX packages are supported?
FormaTeX runs a full TeX Live installation, which includes thousands of packages. All standard packages are available, including amsmath, graphicx, hyperref, biblatex, geometry, booktabs, tikz, pgfplots, listings, xcolor, fontspec (with XeLaTeX or LuaLaTeX), and many more. If your document compiles on a local TeX Live installation, it will compile on FormaTeX. Custom packages that are not part of TeX Live can be uploaded alongside your .tex file as companion files.
\section{Related guides}
Related guides
Explore more conversion tools and LaTeX resources.

