DOCX to PDF

Published Updated

Click "Convert DOCX to PDF" to compile your document's paragraphs and tables locally, then use the print dialog to save it as a PDF — free, private, and processed entirely in your browser.

The PDF comes from your browser's print dialog

This converter reads the text of a .docx, builds a clean print layout from it, and then opens your browser's print dialog. You save the PDF from there with the Save as PDF destination. The layout is simple on purpose: it is the text of your document, not a copy of its design.

A DOCX is a ZIP package, and the body of the document sits in word/document.xml (ECMA-376, Office Open XML). The tool reads only that part.

How the text is picked out of the file

The tool unpacks only word/document.xml, the main story of the file, and walks its body in order. Each paragraph (w:p) becomes a paragraph or a heading and each table (w:tbl) becomes a table. Inside a paragraph, every run (w:r) is written out as plain text: the characters and line breaks; a tab or a run of spaces prints as a single space. Headers, footers, footnotes and comments sit in other parts of the package and are never opened. Microsoft describes a Word file as a set of such stories, with the main body in document.xml (Microsoft Learn).

Headings are recognised by the style ID stored on the paragraph: Title and Heading1 to Heading6 become heading levels 1 to 6, so Title and Heading 1 both print as level 1. A paragraph whose style has any other ID, including a custom heading style, prints as normal text.

What carries over and what does not

In your DOCXIn the PDF
Paragraphs and line breaksKept, in reading order
Headings with the Title or Heading 1 to 6 stylesPrinted as headings
TablesKept as a simple bordered table, cell text only
Bold, italic, underline, colour, font, sizeNot kept
Images and drawn shapesNot included
Text boxesTheir text is included, and may appear twice (see below)
Tracked changes and commentsInsertions are printed, deletions and comments are not
Headers, footers, footnotes, page numbersNot included
Bulleted and numbered listsText only, without the markers
Table of contents and other content controlsSkipped
HyperlinksLink text only, not clickable

Before and after: a test document

A one-page test document was built with python-docx 1.2.0 plus a few hand-written XML parts, then read with this page's own parser in Chromium 152. It holds a title, a heading, a paragraph with bold, italic, red 14-point text, two bullets, two numbered steps, a 3 × 3 table, a picture, a hyperlink, a text box, a page-number field, a contents block, a header and a footer. The tool counted 14 paragraphs, and this is what each element became.

In the test documentWhat the tool read
Title, then a Heading 1Two level-1 headings
Bold, italic, red 14-point runThe words in order, with no bold, italic, colour or size
Two bullets and two numbered stepsFour plain paragraphs, no bullet or number
3 × 3 tableA table of nine cells; the print layout draws thin grey borders
PictureNothing, only an empty paragraph where it stood
HyperlinkThe link text, not clickable
Text boxIts text, added to the paragraph that holds it
Page-number fieldThe saved result, printed as plain text: "Page 1"
Contents blockSkipped
Header and footerNot read

The counter has one entry per table row and skips empty paragraphs, so the test document's 11 paragraphs with text and 3 table rows make the 14.

Three edge cases from testing

A text box can print twice. A DOCX can hold a shape's text twice through the markup-compatibility alternate-content element, which has a Choice branch and a Fallback branch (Microsoft Learn). A second test file stored a text box that way, and the sentence came out twice in a row. Word files with text boxes may follow the same pattern, so check the preview list before you save the PDF. With tracked changes, an insertion is printed and a deletion is left out, so the PDF reads as if every change were accepted. The deleted words are stored in a separate element (w:delText, see Microsoft Learn) that the tool does not read.

Footnote reference marks vanish with the notes themselves. In the second test file, a paragraph that began with a footnote mark came out as only its own words.

Converting a DOCX

  1. Step 1

    Add a .docx file

    Old .doc files are not read. The page shows the file size and how many paragraphs it found.

  2. Step 2

    Press Convert DOCX to PDF

    The text and tables are turned into a plain print layout and your browser's print dialog opens.

  3. Step 3

    Choose Save as PDF

    Pick Save as PDF as the destination, set paper size and margins, then save. The Save / Print PDF button reopens the dialog.

Settings worth checking in the print dialog

  • Destination: Save as PDF.
  • Paper size: A4 or Letter, whichever your reader expects. The dialog's default is not always the one you want.
  • Margins: the page already adds side padding, so the default margins are usually fine.
  • Headers and footers: turn them off if you do not want a date and web address printed on every page.

DOCX to PDF, answered

Why does a print dialog open instead of a download?

The tool does not write a PDF file itself. It lays the text out as a web page and asks your browser to print it, and "Save as PDF" in that dialog produces the file. That is why paper size, margins and page numbers come from the dialog and not from your Word document.

Will my fonts, bold text and images come through?

No. Only text is carried over, set in a serif font with comfortable line spacing. Bold, italics, colours, font sizes and all images are left out. If the page must look like the Word original, export from Word itself.

What about headers, footers and page numbers?

They live in separate parts of the DOCX that this tool does not read, so they are missing. Your browser can add its own date and page numbers in the print dialog.

Are bullets, numbered lists and tables kept?

Tables are kept, with a thin grey border and the text of each cell. List items print as plain paragraphs without their bullet or number. Word's built-in table of contents block is usually skipped.

Does it work with .doc, .odt or .rtf?

No, only .docx. Save older files as .docx in Word or LibreOffice first. A password-protected DOCX cannot be opened either.

Why does one sentence appear twice in my PDF?

Most likely it sits in a text box. A DOCX can store a text box twice, as a drawing and as a fallback copy of the same text, and the tool reads both. In a test file the sentence came out two times in a row. Copy the text out of the box into the main body in Word, then convert again.

Will my tracked changes and comments appear?

Insertions are printed as normal text and deletions are left out, so the PDF looks as if every change were accepted. Comments are stored in a separate part of the file that the tool does not read. Accept or reject changes in Word first if you need a specific version.

Why does the paragraph count not match my document?

The count includes one entry per table row, and it skips empty paragraphs. A file with 11 paragraphs and a 3-row table showed 14. It is a rough check that text was found, not a page or word count.

Related guide

How to compress, merge and convert PDFs without uploading them. The guide sets out what a print-dialog conversion carries over from a .docx and what it drops.

Related Tools