What the PDF to Word does
PDF to Word converts one PDF into a Word document with the same name and a .docx extension. It is a text extractor, not a layout converter: pdf.js reads the text items on each page, the tool groups them into lines, and the docx library builds a document from plain paragraphs with a page break wherever the PDF had one. Images, fonts, colours, columns and tables are not recreated.
That makes it a good fit for text-heavy PDFs you want to edit, quote or reuse: a letter, a report, meeting minutes, an article. It is a poor fit for a brochure, a form or a slide deck exported to PDF, where the design is most of the point. For those, you will spend less time starting a new layout than repairing an extracted one.
Scanned PDFs are a special case. A scan is a picture of a page with no text objects unless someone has run OCR on it. This tool does not perform OCR, so a scan without a text layer produces a Word file of empty pages, or a message that the PDF has no readable text.
How to use it
Choose a text-based PDF
Select one PDF. If you can select and copy text in a viewer, the file has a text layer and will work here; if you cannot, it is a scan and needs OCR first.
Convert
Press Convert. The progress figure advances page by page as pdf.js extracts the text and the paragraphs are assembled.
Open and tidy the DOCX
The result card offers the file with the PDF's name and a .docx extension; press Download to save it. Expect to rejoin lines into paragraphs and to reapply headings and emphasis.
How the text is reconstructed
pdf.js returns each page's text as a list of items with their positions. The tool walks through them in the order the PDF draws them and starts a new Word paragraph whenever the vertical position moves by more than 3 points. In most documents that means each printed line becomes its own paragraph, so a five-line paragraph in the PDF arrives as five short paragraphs in Word.
Items on the same line are joined with a space, or with a line break where pdf.js marks an end of line. Between pages the tool inserts a Word page break, so the DOCX has the same number of pages as the PDF had, even when a page held no text at all.
Drawing order is not always reading order. Two-column layouts, text boxes, headers and footers can come out interleaved, because the PDF may draw the right column before the left or the footer before the body. If the extracted order looks scrambled, that is the source file's internal order showing through, not a random error.
What is lost on the way to Word
Everything in the list below is discarded by design, because the tool reads only the text content of each page. If any of these matter to you, extract the text here and rebuild the formatting in Word, or use a desktop converter that works from the PDF's layout.
- Images, logos, charts and any graphic content
- Fonts, sizes, bold, italic, colour and alignment
- Columns, tables and text boxes, which become plain lines
- Headers, footers and page numbers, which become ordinary text
- Hyperlinks, bookmarks, form fields and comments
- Text inside scanned images, since there is no OCR
Checking the result before you rely on it
Compare the first and last page against the original and run a word count on both; the Word Counter on this site will count the extracted text if you paste it in. Ligatures such as fi, hyphenation at line ends, and symbols from non-standard fonts are the usual places where extracted text differs from what you see on the page, because the PDF stores glyph codes that do not always map cleanly back to characters.
Limits to know before you rely on it
- Only text is converted; images, fonts, formatting, tables and columns are not carried into the DOCX.
- Scanned PDFs without a text layer give blank pages, because the tool has no OCR.
- Each printed line usually becomes a separate paragraph in Word and needs rejoining by hand.
- Multi-column pages can come out in drawing order rather than reading order.
- Encrypted PDFs cannot be opened; the tool reports that the file is protected or unreadable.
- Pages are processed one after another in memory, so very large PDFs can fail in the browser.
Questions people ask about the PDF to Word
Why is my Word document empty or just blank pages?
The PDF has no text layer, which is typical of a scan or a photo of a document. The tool found pages but no text items, so it wrote page breaks and nothing else. Run OCR on the scan in another application first, then convert the OCR output here.
Why does every line end with a paragraph break in Word?
Because the tool starts a new paragraph each time the vertical position changes by more than 3 points, which happens at every printed line. Select the text in Word and use find and replace to turn single paragraph marks into spaces, keeping the blank lines between paragraphs.
Will the Word file keep the page layout of the PDF?
No. You get the text in a single column with default formatting and a page break between pages. Tables, columns, fonts and images are not reproduced. The converter is designed for editing the words, not for matching the look.
Does it keep the page count of the PDF?
Yes. A page break is inserted after every page except the last, so a 12-page PDF produces a Word document with 12 pages, even if some of them are empty.
Can it convert a password-protected PDF?
No. pdf.js cannot open the file without the password and the tool reports that it has no readable text or is protected. Remove the protection first, with the owner's permission, and try again.
Which programs open the DOCX it produces?
The docx library writes standard Office Open XML, so Microsoft Word, LibreOffice Writer, Google Docs and Apple Pages all open it. The document contains only plain paragraphs and page breaks, so compatibility problems are unlikely.
Sources and further reading
- pdf.js API reference for PDFPageProxy: getTextContent, the call that returns each page's text items and positions
- docx library documentation: Document, Paragraph, PageBreak and Packer, used to build the .docx in the browser
- Microsoft Learn: structure of a WordprocessingML document, what a DOCX file contains
- Library of Congress format description of DOCX (Office Open XML, ISO 29500 and ECMA-376)