Convert PDF to the DOCX Format

Converting PDF to DOCX means translating a page-description file into Office Open XML — the zipped XML package that Word has used natively since 2007. Because a PDF contains positioned glyphs rather than the paragraph and style tree a .docx requires, the converter must reconstruct that tree, and different tools make different trade-offs while doing it. This page focuses on what actually ends up inside the .docx and on scriptable, batch-friendly routes: the pdf2docx library, LibreOffice's headless mode, and Acrobat's Action Wizard.

Why there is no one-click converter on this page

Writing a faithful .docx requires reconstructing paragraphs, styles, and tables from raw glyph positions — a layout-analysis engine far beyond what a browser page can run trustworthily on-device. The command-line and desktop methods below do the job properly, including in bulk.

Disclosure: this page contains affiliate placeholder links. If they were live, we could earn a commission at no extra cost to you.

AFFILIATE PLACEHOLDER: Recommended desktop PDF suite (placeholder link)

How to convert PDF to DOCX (step by step)

Method 1: pdf2docx on the command line (free, scriptable)

  1. Install Python 3.8 or later, then run pip install pdf2docx.
  2. Convert a single file: pdf2docx convert report.pdf report.docx.
  3. Batch-convert a folder: for f in *.pdf; do pdf2docx convert "$f" "${f%.pdf}.docx"; done (bash), or the equivalent Get-ChildItem *.pdf | ForEach-Object { pdf2docx convert $_.Name ($_.BaseName + ".docx") } in PowerShell.
  4. Spot-check a sample of the output files in Word before trusting the whole batch.

pdf2docx parses the PDF with PyMuPDF, detects table borders and text blocks, and writes the .docx with python-docx. It is the best free option for table-heavy, digitally created PDFs, and it exposes options such as --start and --end for page ranges.

Method 2: LibreOffice headless

  1. Install LibreOffice (free, all platforms).
  2. Run soffice --headless --infilter="writer_pdf_import" --convert-to docx --outdir out/ *.pdf.

Caveat: LibreOffice imports PDFs through Draw, so each text line becomes a separately positioned frame rather than flowing paragraphs. It is fine for small text fixes and for automated pipelines where visual position matters more than editability.

Method 3: Acrobat Pro's Action Wizard (batch, with OCR)

  1. In Acrobat Pro, open All tools → Use guided actions → New Action.
  2. Add the Save As → Microsoft Word Document step, point the action at a folder, and run it.
  3. Acrobat OCRs any scanned pages automatically during export — the only batch route here that handles scans without a separate OCR pass.

How it works

A .docx file is a ZIP archive. Unzip one and you find word/document.xml (the body as a tree of <w:p> paragraphs containing <w:r> runs), word/styles.xml (named styles), word/media/ (images), and relationship files binding them together. Everything is logical structure: a table is a <w:tbl> element with rows and cells, and nothing in the file says where a line of text will land on the page — Word's layout engine decides that at open time.

A PDF holds the opposite: a content stream per page with operators that set a font, move a text cursor to fixed coordinates, and paint glyph runs. The converter's job is to invert layout. It groups glyphs into lines and blocks from their geometry, decides which blocks are body text, headings, headers, or footers, detects tables from ruling lines or aligned columns, and only then can it emit sensible <w:p> and <w:tbl> elements. Tools that skip the hard inference step instead wrap each block in an absolutely positioned text box (<w:framePr> or a drawing anchor) — the page looks right, but pressing Enter in one box does not reflow the rest, which is the classic "uneditable but accurate" failure mode.

Character identity is a separate hazard. PDF fonts are usually embedded subsets whose internal codes need a ToUnicode CMap to map back to real characters; ligatures such as "fi" may be single glyphs that a careless converter writes as one unknown character. Fonts themselves are almost never transplanted into the .docx: subsets are incomplete and most font licenses forbid re-embedding, so the .docx stores only the font name and relies on the target machine having it installed.

None of this applies to scanned PDFs, where each page is one image and there are no glyphs to analyze. Batch pipelines should test for this up front — pdffonts file.pdf listing zero fonts is a quick tell — and route those files through OCR before conversion.

Worked example: batch-converting 40 invoices

A bookkeeping cleanup required 40 supplier invoices (PDF, 1–3 pages each, 6.1 MB total) as editable .docx. The pdf2docx bash loop above processed all 40 in 74 seconds on a 2022 laptop, producing 40 files totalling 3.4 MB. Sampling 8 of them: line-item tables came through as real Word tables in 7, while 1 invoice with borderless columns lost its grid and needed manual table conversion. The same folder through soffice --headless finished faster (41 seconds) but produced frame-per-line output that was unusable for editing amounts. Two of the 40 files turned out to be scans (0 fonts reported by pdffonts); they went through ocrmypdf first (adding about 12 seconds each) and then converted cleanly.

Frequently asked questions

What is the difference between converting PDF to Word and PDF to DOCX?

Nothing in practice: .docx has been Word's native format since 2007, so every modern PDF-to-Word converter writes .docx. The distinction only matters if you need the legacy binary .doc format, which requires an extra save-as step afterward.

How do I convert many PDFs to DOCX at once?

Use a command-line tool in a loop: the pdf2docx Python library, or LibreOffice with soffice --headless --convert-to docx *.pdf. Acrobat Pro can also batch-export a folder through its Action Wizard.

Can I convert PDF to DOCX on the command line without installing Word?

Yes. pdf2docx runs anywhere Python runs and needs no Office installation, and LibreOffice's soffice binary converts headlessly on Windows, macOS, and Linux servers. Neither requires a Microsoft license.

Why is my converted .docx full of text boxes instead of normal paragraphs?

The converter chose layout fidelity over editability: placing each PDF text block in an absolutely positioned text box keeps the page looking right without solving reading order. If you need flowing paragraphs, use a converter with a flowing-text mode, such as Word's own import or Acrobat's Retain Flowing Text setting.

Does PDF to DOCX conversion preserve fonts?

The .docx records font names, but the font files themselves are rarely carried across, because PDFs embed subsets that are incomplete and often restricted by license. If the named font is not installed on the machine opening the file, Word substitutes another, which shifts line breaks.

Will a .docx converted from PDF open in older versions of Word?

Word 2007 and later open .docx natively, and Word 2003 can with Microsoft's Compatibility Pack. Features written by the converter, such as advanced text-box positioning, may render slightly differently in very old versions.

Related tools