PDF to Word (.docx) Converter

Turn any PDF to word document. Convert privately in your browser, or let our server handle the heavy lifting.

Fast engine

Pure JavaScript, starts instantly. Ideal for letters, essays and text-heavy reports.

WebAssembly engine

Runs the pdf2docx Python library inside your browser for the most faithful layout: tables, columns and images.

Server mode

For very large files or slower devices. We convert on our servers and delete everything after 24 hours.

How to convert PDF to Word with PDFBae

  1. Choose where to convert: in your browser (private) or on our server.
  2. Select a PDF from your device, drop it on the page, or paste a link.
  3. In browser mode, pick the Fast or WebAssembly engine — we recommend one based on your document.
  4. Click Convert to Word and watch every step live. Your .docx downloads automatically.

Which method should you use?

No converter is perfect for every PDF. Our online tool is the quickest option and works on any device. If you have Microsoft Word on a Windows computer, Word's own converter usually gives the most faithful layout for complex documents — and below we show you exactly how to use it, including ready-to-run scripts.

Method Works on You need Layout quality File stays on your device
PDFBae — Fast Any device A browser Good for text documents Yes
PDFBae — WebAssembly Any device A browser (one-time engine download) Very good Yes
PDFBae — Server Any device A browser Very good No — deleted after 24 hours
Microsoft Word (manual or script) Windows Microsoft Word 2013 or newer Excellent Yes
pdf2docx Windows, macOS, Linux Python Very good Yes
LibreOffice Windows, macOS, Linux LibreOffice (free) Fair — uses text boxes Yes
Google Docs Any device A Google account Fair — text only, reads scans No — uploaded to Google Drive

Convert PDF to Word on your own computer

Prefer to work offline, or need to convert lots of files at once? These methods run entirely on your computer. Every script below is ready to copy — just change the file name where shown.

1

Microsoft Word — no code needed

Word 2013 and newer on Windows can open a PDF directly and turn it into an editable document. This is the same converter the scripts below use, so start here if you only have one or two files.

  1. Open Microsoft Word and go to File → Open.
  2. Choose your PDF. When Word says it will convert the PDF into an editable document, click OK.
  3. Check the result, then go to File → Save As and pick Word Document (*.docx).
2

Python script using Microsoft Word — best quality, many files

This script asks Word to open each PDF in the background and save it as .docx. You get Word's own high-quality conversion, and you can convert a whole folder in one go. It needs Windows, Microsoft Word and Python.

Step 1 — install the one library it needs

Install Python from python.org if you don't have it (tick “Add Python to PATH” during setup). Then open Command Prompt and run:

Command Prompt
pip install pywin32

Step 2 — save the script

Copy the code below into a new file named convert_pdf_to_word.py (Notepad is fine — choose “All files” when saving), or use the Download button. Save it in the same folder as your PDF, and change PDF_FILE to your PDF's name.

convert_pdf_to_word.py
# convert_pdf_to_word.py
# Converts PDF files to Word (.docx) using Microsoft Word itself.
# Needs: Windows + Microsoft Word 2013 or newer + Python 3 + "pip install pywin32"
#
# How to run (from the folder this file is in):
#   python convert_pdf_to_word.py                        converts PDF_FILE below
#   python convert_pdf_to_word.py "Report 2024.pdf"      converts that file
#   python convert_pdf_to_word.py "C:\Users\me\PDFs"     converts every PDF in that folder

import os
import sys

import win32com.client

PDF_FILE = "my-document.pdf"  # change this to your PDF's file name

WORD_DOCX_FORMAT = 16  # Word's code for the .docx format


def convert(word, pdf_path):
    pdf_path = os.path.abspath(pdf_path)
    docx_path = os.path.splitext(pdf_path)[0] + ".docx"
    print(f"Converting {os.path.basename(pdf_path)} (this may take a moment)...")
    doc = word.Documents.Open(pdf_path, ConfirmConversions=False, ReadOnly=True, AddToRecentFiles=False)
    try:
        doc.SaveAs2(docx_path, FileFormat=WORD_DOCX_FORMAT)
    finally:
        doc.Close(SaveChanges=False)
    print(f"  Saved {docx_path}")


def main():
    target = sys.argv[1] if len(sys.argv) > 1 else PDF_FILE

    if os.path.isdir(target):
        pdfs = [os.path.join(target, name) for name in sorted(os.listdir(target)) if name.lower().endswith(".pdf")]
    else:
        pdfs = [target]

    if not pdfs:
        print(f"No PDF files found in {target}")
        sys.exit(1)
    for pdf in pdfs:
        if not os.path.isfile(pdf):
            print(f"File not found: {pdf}")
            print("Check the name in PDF_FILE, and that this script is in the same folder as your PDF.")
            sys.exit(1)

    # A separate, hidden copy of Word, so documents you already have open are not touched.
    word = win32com.client.DispatchEx("Word.Application")
    word.Visible = False
    word.DisplayAlerts = 0  # skip the "Word will now convert your PDF" prompt
    try:
        for pdf in pdfs:
            convert(word, pdf)
    finally:
        word.Quit()

    print(f"Done. Converted {len(pdfs)} file(s).")


if __name__ == "__main__":
    main()

Step 3 — run it

Open the folder in File Explorer, type cmd in the address bar and press Enter. Then run the command below. The .docx is saved next to your PDF with the same name.

Command Prompt
python convert_pdf_to_word.py

To convert a different file without editing the script, put its name after the command in quotes, for example python convert_pdf_to_word.py "Invoice March.pdf". To convert every PDF in a folder, give the folder path instead.

3

PowerShell + Microsoft Word — no Python needed

Same Word-quality result, nothing to install. It converts every PDF in a folder. Open the folder in File Explorer, type powershell in the address bar and press Enter, then paste this and press Enter:

PowerShell
# Converts every PDF in the current folder to .docx using Microsoft Word
$word = New-Object -ComObject Word.Application
$word.Visible = $false
$word.DisplayAlerts = 0
try {
    Get-ChildItem -Path . -Filter *.pdf | ForEach-Object {
        Write-Host "Converting $($_.Name) ..."
        $doc = $word.Documents.Open($_.FullName, $false, $true)
        $out = [System.IO.Path]::ChangeExtension($_.FullName, ".docx")
        $doc.SaveAs2($out, 16)
        $doc.Close($false)
        Write-Host "  Saved $out"
    }
} finally {
    $word.Quit()
    [void][System.Runtime.InteropServices.Marshal]::ReleaseComObject($word)
}

Only want one file? Replace -Filter *.pdf with the file name in quotes, for example -Filter "Report.pdf".

4

pdf2docx — free, works on Windows, macOS and Linux

pdf2docx is the open-source library behind our WebAssembly engine. Running it yourself is handy on a Mac or Linux computer, or for big batches without Word. Install it once, then convert from the terminal:

Terminal / Command Prompt
pip install pdf2docx
pdf2docx convert "my-document.pdf" "my-document.docx"

On macOS and Linux you may need pip3 instead of pip.

5

LibreOffice — free office suite, one command

If you have LibreOffice installed, it can convert from the command line. The text stays editable, but pages are often rebuilt with text boxes, so it suits simple documents best. Run the line for your system from the folder that contains your PDF:

Windows — Command Prompt
"C:\Program Files\LibreOffice\program\soffice.exe" --headless --infilter="writer_pdf_import" --convert-to docx "my-document.pdf"
macOS — Terminal
/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --infilter="writer_pdf_import" --convert-to docx "my-document.pdf"
Linux — Terminal
soffice --headless --infilter="writer_pdf_import" --convert-to docx "my-document.pdf"
6

Google Docs — nothing to install

Google Docs can read text from PDFs, including scanned ones, but it keeps little of the original layout and your file is uploaded to Google Drive.

  1. Upload the PDF to Google Drive.
  2. Right-click it and choose Open with → Google Docs.
  3. Go to File → Download → Microsoft Word (.docx).

Tips for the best results

Your privacy

In browser mode, conversion happens entirely on your device: your PDF is never uploaded. The WebAssembly engine is downloaded once and cached by your browser. In server mode, files travel over an encrypted connection and are deleted automatically after 24 hours.

File size and usage limits

Frequently asked questions

Why does Microsoft Word's conversion often look better? +

Word uses its own built-in layout engine to rebuild the page, and that engine only exists inside the desktop Word app. It can't run in a web browser or on a web server, which is why we show you how to use it on your own computer instead.

Are the scripts safe to run? +

Yes. They only ask Word, LibreOffice or pdf2docx on your computer to open your PDF and save a .docx next to it. Nothing is sent over the internet, and the code is short enough to read before you run it.

I get "No module named win32com" or "python is not recognized" +

Run pip install pywin32 for the first message. For the second, reinstall Python from python.org and tick “Add Python to PATH”, then open a new Command Prompt window.

Can I convert a scanned PDF? +

Our converter keeps scanned pages as pictures, so they look right but the text isn't editable. To get editable text from a scan you need OCR (text recognition) — Microsoft Word and Google Docs can both read text from many scans.

Does converting change my original PDF? +

No. Every method here — our tool and the scripts — only reads your PDF and creates a new .docx file.